class Piwik (View source)

Class Piwik.

Traits

Properties

protected ConfigRepository $config from  ConfigTrait

Methods

__construct(ConfigRepository $config, RequestRepository $request)

Piwik constructor.

string
getSiteId()

Retrieve Site ID from configuration.

string
getPiwikUrl()

Retrieve Piwik URL from configuration.

string
convertUrl(string $url, bool $https)

Convert URL from HTTP to HTTPS and vice versa.

getActions()

Initialise the Actions module.

getAPI()

Initialise the API Module.

getContents()

Initialise the Contents Module.

getEvents()

Initialise the Events Module.

getLive()

Initialise the Live Module.

getProvider()

Initialise the Provider Module.

getReferrers()

Initialise the Referrers Module.

getSEO()

Initialise the SEO Module.

getSitesManager()

Initialise the SitesManager Module.

getUsersManager()

Initialise the UsersManager Module.

getVisitorInterest()

Initialise the VisitorInterest Module.

getVisitsSummary()

Initialise the VisitsSummary Module.

getUserCountry()

Initialise the UserCountryModule Module.

getDevicesDetection()

Initialise the DevicesDetection Module.

string
getTag()

Get javascript tag for use in tracking the website.

mixed
getCustom(RequestOptions $requestOptions)

Create a custom request N.B. It is safer to raise a GitHub issue to request another API method.

mixed
actions(string $format = null) deprecated

Get actions (hits) for the specific time period.

mixed
downloads(string $format = null) deprecated

Get file downloads for the specific time period.

mixed
keywords(string $format = null) deprecated

Get search keywords for the specific time period.

mixed
last_visits(int $count, string $format = null) deprecated

Get information about last 10 visits (ip, time, country, pages, etc.).

mixed
last_visits_parsed(int $count, string $format = null) deprecated

Get information about last 10 visits (ip, time, country, pages, etc.) in a formatted array with GeoIP information if enabled.

mixed
outlinks(string $format = null) deprecated

Get outlinks for the specific time period.

mixed
page_titles(string $format = null) deprecated

Get page visit information for the specific time period.

mixed
search_engines(string $format = null) deprecated

Get search engine referer information for the specific time period.

mixed
unique_visitors(string $format = null) deprecated

Get unique visitors for the specific time period.

mixed
visits(string $format = null) deprecated

Get all visits for the specific time period.

mixed
websites(string $format = null) deprecated

Get referring websites (traffic sources) for the specific time period.

mixed
seo_rank(int $siteId, string $format = null) deprecated

Get SEO Rank for the website.

string
tag() deprecated

Get javascript tag for use in tracking the website.

mixed
version(string $format = null) deprecated

Get Version of the Piwik Server.

Details

__construct(ConfigRepository $config, RequestRepository $request)

Piwik constructor.

Parameters

ConfigRepository $config
RequestRepository $request

string getSiteId()

Retrieve Site ID from configuration.

Return Value

string

site id retrieved from configuration

string getPiwikUrl()

Retrieve Piwik URL from configuration.

Return Value

string

piwik url retrieved from configuration

protected string convertUrl(string $url, bool $https)

Convert URL from HTTP to HTTPS and vice versa.

Parameters

string $url
bool $https

Return Value

string

ActionsModule getActions()

Initialise the Actions module.

APIModule getAPI()

Initialise the API Module.

ContentsModule getContents()

Initialise the Contents Module.

EventsModule getEvents()

Initialise the Events Module.

LiveModule getLive()

Initialise the Live Module.

ProviderModule getProvider()

Initialise the Provider Module.

ReferrersModule getReferrers()

Initialise the Referrers Module.

SEOModule getSEO()

Initialise the SEO Module.

SitesManagerModule getSitesManager()

Initialise the SitesManager Module.

UsersManagerModule getUsersManager()

Initialise the UsersManager Module.

VisitorInterestModule getVisitorInterest()

Initialise the VisitorInterest Module.

VisitsSummaryModule getVisitsSummary()

Initialise the VisitsSummary Module.

UserCountryModule getUserCountry()

Initialise the UserCountryModule Module.

DevicesDetectionModule getDevicesDetection()

Initialise the DevicesDetection Module.

string getTag()

Get javascript tag for use in tracking the website.

Return Value

string

mixed getCustom(RequestOptions $requestOptions)

Create a custom request N.B. It is safer to raise a GitHub issue to request another API method.

Parameters

RequestOptions $requestOptions

Return Value

mixed

See also

https://github.com/RobBrazier/Laravel_Piwik/issues

mixed actions(string $format = null) deprecated

deprecated

Get actions (hits) for the specific time period.

Parameters

string $format

Override string for the format of the API Query to be returned as

Return Value

mixed

See also

VisitsSummaryModule::getActions

mixed downloads(string $format = null) deprecated

deprecated

Get file downloads for the specific time period.

Parameters

string $format

Override string for the format of the API Query to be returned as

Return Value

mixed

See also

ActionsModule::getDownloads

mixed keywords(string $format = null) deprecated

deprecated

Get search keywords for the specific time period.

Parameters

string $format

Override string for the format of the API Query to be returned as

Return Value

mixed

See also

ReferrersModule::getKeywords

mixed last_visits(int $count, string $format = null) deprecated

deprecated

Get information about last 10 visits (ip, time, country, pages, etc.).

Parameters

int $count

Limit the number of visits returned by $count

string $format

Override string for the format of the API Query to be returned as

Return Value

mixed

See also

LiveModule::getLastVisitsDetails

mixed last_visits_parsed(int $count, string $format = null) deprecated

deprecated

Get information about last 10 visits (ip, time, country, pages, etc.) in a formatted array with GeoIP information if enabled.

Parameters

int $count

Limit the number of visits returned by $count

string $format

Override string for the format of the API Query to be returned as

Return Value

mixed

deprecated

Get outlinks for the specific time period.

Parameters

string $format

Override string for the format of the API Query to be returned as

Return Value

mixed

See also

ActionsModule::getOutlinks

mixed page_titles(string $format = null) deprecated

deprecated

Get page visit information for the specific time period.

Parameters

string $format

Override string for the format of the API Query to be returned as

Return Value

mixed

See also

ActionsModule::getPageTitles

mixed search_engines(string $format = null) deprecated

deprecated

Get search engine referer information for the specific time period.

Parameters

string $format

Override string for the format of the API Query to be returned as

Return Value

mixed

See also

ReferrersModule::getSearchEngines

mixed unique_visitors(string $format = null) deprecated

deprecated

Get unique visitors for the specific time period.

Parameters

string $format

Override string for the format of the API Query to be returned as

Return Value

mixed

See also

VisitsSummaryModule::getUniqueVisitors

mixed visits(string $format = null) deprecated

deprecated

Get all visits for the specific time period.

Parameters

string $format

Override string for the format of the API Query to be returned as

Return Value

mixed

See also

VisitsSummaryModule::getVisits

mixed websites(string $format = null) deprecated

deprecated

Get referring websites (traffic sources) for the specific time period.

Parameters

string $format

Override string for the format of the API Query to be returned as

Return Value

mixed

See also

ReferrersModule::getWebsites

mixed seo_rank(int $siteId, string $format = null) deprecated

deprecated

Get SEO Rank for the website.

Parameters

int $siteId

Override for ID, so you can specify one rather than fetching it from config

string $format

Override string for the format of the API Query to be returned as

Return Value

mixed

See also

SEOModule::getRankFromSiteId

string tag() deprecated

deprecated

Get javascript tag for use in tracking the website.

Return Value

string

See also

Piwik::getTag

mixed version(string $format = null) deprecated

deprecated

Get Version of the Piwik Server.

Parameters

string $format

Override string for the format of the API Query to be returned as

Return Value

mixed

See also

APIModule::getPiwikVersion