PiwikTrackerLocated in /libs/PiwikTracker/PiwikTracker.php (line 24)
void
addEcommerceItem
(string $sku, [string $name = false], [string|array $category = false], [float|int $price = false], [int $quantity = false])
void
doTrackEcommerceOrder
(string|int $orderId, float $grandTotal, [float $subTotal = false], [float $tax = false], [float $shipping = false], [float $discount = false])
void
setEcommerceView
([string $sku = false], [string $name = false], [string|array $category = false], [float $price = false])
void
setPlugins
([bool $flash = false], [bool $java = false], [bool $director = false], [bool $quickTime = false], [bool $realPlayer = false], [bool $pdf = false], [bool $windowsMedia = false], [bool $gears = false], [bool $silverlight = false])
Constructor __construct (line 63)
Builds a PiwikTracker object, used to track visits, pages and Goal conversions for a specific website, by using the Piwik Tracking API.
addEcommerceItem (line 298)
Adds an item in the Ecommerce order.
This should be called before doTrackEcommerceOrder(), or before doTrackEcommerceCartUpdate(). This function can be called for all individual products in the cart (or order). SKU parameter is mandatory. Other parameters are optional (set to false if value not known). Ecommerce items added via this function are automatically cleared when doTrackEcommerceOrder() or getUrlTrackEcommerceOrder() is called.
disableCookieSupport (line 702)
By default, PiwikTracker will read third party cookies from the response and sets them in the next request.
This can be disabled by calling this function.
doTrackAction (line 277)
Tracks a download or outlink
doTrackEcommerceCartUpdate (line 316)
Tracks a Cart Update (add item, remove item, update item).
On every Cart update, you must call addEcommerceItem() for each item (product) in the cart, including the items that haven't been updated since the last cart update. Items which were in the previous cart and are not sent in later Cart updates will be deleted from the cart (in the database).
doTrackEcommerceOrder (line 338)
Tracks an Ecommerce order.
If the Ecommerce order contains items (products), you must call first the addEcommerceItem() for each item in the order. All revenues (grandTotal, subTotal, tax, shipping, discount) will be individually summed and reported in Piwik reports. Only the parameters $orderId and $grandTotal are required.
doTrackGoal (line 264)
Records a Goal conversion
doTrackPageView (line 251)
Tracks a page view
getAttributionInfo (line 600)
Returns the currently assigned Attribution Information stored in a first party cookie.
This function will only work if the user is initiating the current request, and his cookies can be read by PHP from the $_COOKIE array.
getCustomVariable (line 185)
Returns the currently assigned Custom Variable stored in a first party cookie.
This function will only work if the user is initiating the current request, and his cookies can be read by PHP from the $_COOKIE array.
getTimestamp (line 783)
Returns current timestamp, or forced timestamp/datetime if it was set
getUrlTrackAction (line 506)
getUrlTrackGoal (line 490)
getUrlTrackPageView (line 475)
getVisitorId (line 570)
If the user initiating the request has the Piwik first party cookie, this function will try and return the ID parsed from this first party cookie (found in $_COOKIE).
If you call this function from a server, where the call is triggered by a cron or script not initiated by the actual visitor being tracked, then it will return the random Visitor ID that was assigned to this visit object.
This can be used if you wish to record more visits, actions or goals for this visitor ID later on.
setAttributionInfo (line 134)
Sets the attribution information to the visit, so that subsequent Goal conversions are properly attributed to the right Referrer URL, timestamp, Campaign Name & Keyword.
This must be a JSON encoded string that would typically be fetched from the JS API: piwikTracker.getAttributionInfo() and that you have JSON encoded via JSON2.stringify()
setBrowserHasCookies (line 653)
Sets if the browser supports cookies This is reported in "List of plugins" report in Piwik.
setBrowserLanguage (line 228)
Sets the Browser language. Used to guess visitor countries when GeoIP is not enabled
setCustomVariable (line 153)
Sets Visit Custom Variable.
See http://piwik.org/docs/custom-variables/
setDebugStringAppend (line 662)
Will append a custom string at the end of the Tracking request.
setEcommerceView (line 362)
Sets the current page view as an item (product) page view, or an Ecommerce Category page view.
This must be called before doTrackPageView() on this product/category page. It will set 3 custom variables of scope "page" with the SKU, Name and Category for this page view. Note: Custom Variables of scope "page" slots 3, 4 and 5 will be used.
On a category page, you may set the parameter $category only and set the other parameters to false.
Tracking Product/Category page views will allow Piwik to report on Product & Categories conversion rates (Conversion rate = Ecommerce orders containing this product or category / Visits to the product or category)
setForceVisitDateTime (line 522)
Overrides server date and time for the tracking requests.
By default Piwik will track requests for the "current datetime" but this function allows you to track visits in the past. All times are in UTC.
Allowed only for Super User, must be used along with setTokenAuth()
setIp (line 534)
Overrides IP address
Allowed only for Super User, must be used along with setTokenAuth()
setLocalTime (line 627)
Sets local visitor time
setPlugins (line 680)
Sets visitor browser supported plugins
setResolution (line 641)
Sets user resolution width and height.
setTokenAuth (line 617)
Some Tracking API functionnality requires express authentication, using either the Super User token_auth, or a user with 'admin' access to the website.
The following features require access:
setUrl (line 100)
Sets the current URL being tracked
setUrlReferrer (line 110)
Sets the URL referrer used to track Referrers details for new visits.
setUserAgent (line 239)
Sets the user agent, used to detect OS and browser.
If this function is not called, the User Agent will default to the current user agent.
setVisitorId (line 549)
Forces the requests to be recorded for the specified Visitor ID rather than using the heuristics based on IP and other attributes.
This is typically used with the Javascript getVisitorId() function.
Allowed only for Super User, must be used along with setTokenAuth().
Documentation generated on Tue, 15 May 2012 17:24:07 -0400 by phpDocumentor 1.4.3