Tracking endpoint
Changed onEndpoint tracking events (page views, goal conversions, custom events).
IMPORTANT: All of string type values HAVE TO be urlencoded in raw URL, according to https://url.spec.whatwg.org/ specification, as shown in examples. Decoded value is provided in at the end of description.
Request
- Base URLhttps://example.piwik.pro
- AuthOAuth 2Client credentialsToken URL/auth/token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
Recommended Application ID (previously Website ID).
IMPORTANT: Requests should contain idsite parameter with actual UUID of one of your apps, otherwise they won't appear in reports.
Recommended Whether the request should be recorded.
IMPORTANT: Requests should contain rec=1 parameter, otherwise they won't appear in reports.
Recommended URL of an event.
IMPORTANT: URL/URI has to have authority or mailto scheme. You can lean more about authority and scheme here.
Decoded value: https://example.com/path/to/page.html
Recommended Name of event. Could be page title or custom-built path expressing the location in application.
Decoded value: help/delivery/shipping
Recommended Visitor ID.
It allows you to use the application identifier of a Visitor instead of a default identifier generated by the analytics. See: Recognizing Visitors.
Recommended Cache buster.
Its value should be unique for every request to make sure that the request is sent to server and not read from a cache. Value can be random or sequential (e.g. UNIX timestamp). It is especially useful if the visitor is behind some kind of caching proxy.
HTTP referrer.
The URL of the previous page that linked to current one.
IMPORTANT: URL/URI has to have authority or mailto scheme. You can lean more about authority and scheme here.
Decoded value: http://example.com/path/to/previous/page.html
Custom variables set in the session scope.
IMPORTANT: value have to be urlencoded in raw URL, below is decoded JSON, do not use it directly in raw URL.
Decoded value: {"1":["AspectRatio","16:9"],"2":["Height","1080"],"3":["Width","1920"]}
Format: Object serialized with JSON:
- key - (string) Custom variable ID
- value - Array with:
- (string) Custom variable name, max length: 200 characters
- (string) Custom variable value, max length: 200 characters
Custom variables set in the event scope.
IMPORTANT: value have to be urlencoded in raw URL, below is decoded JSON, do not use it directly in raw URL.
Decoded value: {"1":["AspectRatio","16:9"],"2":["Height","1080"],"3":["Width","1920"]}
Format: Object serialized with JSON:
- key - (string) Custom variable ID
- value - Array with:
- (string) Custom variable name, max length: 200 characters
- (string) Custom variable value, max length: 200 characters
Visit counter.
It sets the visit number of the visitor. It should be used when the application already tracks how many times the visitor used it and you want to override default visit counter.
Time of previous visit in UNIX timestamp format (number of seconds since 1970-01-01).
Time of first visit.
Resolution of the visitor's device in pixels.
Hour when the request was made in the visitor's local time.
Minute when the request was made in the visitor's local time.
Second when the request was made in the visitor's local time.
User-Agent browser value. It can be used to override value send in request HTTP header.
It is used to detect Visitors browser and operating system.
Decoded value: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36
Accept-Language browser value. It can be used to override value send in request HTTP header.
It's used to guess Visitors country when GeoIP is not able to determine it.
Decoded value: en-US,en;q=0.9,pl;q=0.8
User ID.
Can be used to identify Visitor by the application (e.g. login name, email address or internal user ID). See: Recognizing Visitors.
Decoded value PhilipFry@example.com
Configuration ID.
Semi-unique hash generated for the visitor's browser (based on configuration and installed plugins). This parameter overwrites visitor's visitor_id sent with _id parameter. For further explanation please read the following article: Recognizing Visitors - the VisitorID section.
Force start of new visit when value is 1.
Custom dimension value for specific ID. Assigns arbitrary value to specific session or event dimension.
ID in the parameter name should be replaced with its integer value (e.g. dimension1, dimension2, dimension999).
It is possible to override page view's event custom dimension by sending ping request with updated dimension value.
Decoded value: blue crab cult(not that blue)
External URL opened by the Visitor. It is recommended to set url parameter to same value.
IMPORTANT: URL/URI has to have authority or mailto scheme. You can lean more about authority and scheme here.
Decoded value: http://help-example.com/how-to/register.html
URL of downloaded file.
IMPORTANT: URL/URI has to have authority or mailto scheme. You can lean more about authority and scheme here.
Decoded value: http://example.com/files/TermsOfService.pdf
Internal search query. Used for tracking keyword the visitor searched for in the application. See: Site search.
Requests with this parameter create Search events.
Decoded value: sherlock holmes
Internal search category. Used for tracking category the visitor specified during a search in the application. See: Site search.
Requests with this parameter create Search events.
Deprecated in favor of search_cats parameter.
Decoded value: Movies & TV
Internal search categories. Used for tracking categories the visitor specified during a search in the application. See: Site search.
IMPORTANT: value have to be urlencoded in raw URL, below is decoded JSON, do not use it directly in raw URL.
Decoded value: ["Movies & TV","Cartoons","Video games"]
Requests with this parameter create Search events.
The provided value must be a JSON-serialized array of strings.
Internal search result count. Number of results found in a search. See: Site search.
Requests with this parameter create Search events.
Unique page view ID generated when the page is loaded.
Used to connect future events with the last page view.
Goal ID. Signifies that a goal has been reached and tracks its conversion.
Accepts either Goal UUID or legacy integer Goal ID.
Value 0 is reserved for E-commerce cart tracking.
Revenue value of achieved goal; if e_t is 'order' or 'cart-update,' then the revenue reflects the grandTotal of the cart.
Currency of the value does not matter, but only one should be used by the application (e.g. USD).
Type of event in tracking request. Used for some event types. Decides how other parameters will be interpreted.
E-commerce order ID.
Decoded value: order-123 customer-321
Alias for ec_products. Use new parameter ec_products.
Contents of the E-commerce cart in form of two dimensional, index positioned JSON array. This is NOT an associative array.
IMPORTANT: value have to be urlencoded in raw URL, below is decoded JSON, do not use it directly in raw URL.
Decoded value: [ [ "craft-311", "Unicorn Iron on Patch", "Crafts & Sewing", 4.99, 3, "FairyTales", "3-color rainbow" ], [ "craft-312", "Unicorn Lamp", [ "Crafts & Sewing", "Lamps" ], 13.25, 1, "FairyTales", "black-and-white", { "1":"custom glitter" } ] ]
optional parameters can be replaced with JSON null value, put in their respective position.
Each product on the list can contain:
- [0] sku: string (required) Stock keeping unit. Max 1024 bytes long.
- [1] name: string (optional) Name of a product. Max 1024 bytes long.
- [2] category: string|Array<string> (optional) Category of a product. Max 5 categories, each 1024 bytes long.
- [3] price: number (optional, defaults to 0.0) Price of a product. Currency of this value does not matter, but only one should be used by the application (e.g. USD).
- [4] quantity: integer (optional, defaults to 1) Quantity of a product.
- [5] brand: string (optional) a brand of the product
- [6] variant: string (optional) a variant of the product
- [7] product custom dimensions: Object<string, string> (optional) a dictionary of custom dimension values, numeric string ID and a string with value. Max 20 product custom dimensions, 20 is max ID.
Legend: [index] name: data type (requisite) Description. Restrictions.
E-commerce cart must not contain more than 100 products.
E-commerce order sub-total (order cost without shipping).
Currency of the value does not matter, but only one should be used by the application (e.g. USD).
E-commerce order tax.
Currency of the value does not matter, but only one should be used by the application (e.g. USD).
E-commerce order shipping.
Currency of the value does not matter, but only one should be used by the application (e.g. USD).
E-commerce order discount.
Currency of the value does not matter, but only one should be used by the application (e.g. USD).
Currency of the revenue and all monetary values in the request. If not provided, the currency value set in app settings will be used.
The currency code must comply with the ISO 4217 standard.
Time of the last E-commerce order in UNIX timestamp format (number of seconds since 1970-01-01).
Page generation and load time in milliseconds.
Page charset.
Used for decoding parameters in event URL.
Status of Cookie capability in Visitor's browser (value "1" indicates that it is enabled).
Status of Flash plugin in Visitor's browser (value "1" indicates that it is installed).
Status of Java plugin in Visitor's browser (value "1" indicates that it is installed).
Status of Adobe Director plugin in Visitor's browser (value "1" indicates that it is installed).
Status of QuickTime plugin in Visitor's browser (value "1" indicates that it is installed).
Status of RealPlayer plugin in Visitor's browser (value "1" indicates that it is installed).
Status of PDF plugin in Visitor's browser (value "1" indicates that it is installed).
Status of Windows Media Player plugin in Visitor's browser (value "1" indicates that it is installed).
Status of (Google) Gears plugin in Visitor's browser (value "1" indicates that it is installed).
Status of Silverlight plugin in Visitor's browser (value "1" indicates that it is installed).
Custom event category.
Custom event action.
Custom event name.
Custom event value.
Content name.
'Content piece.'
Decoded value: Unicorn Iron on Patch
'Content target.'
Decoded value: http://example.com/product/unicorn-iron-on-path.html
'Content interaction. If this value is supplied with c_n parameter, the event becomes of Content interaction type. In addition, if c_persid is supplied, if this value is click personalization is assigned to personalizations_clicked_ids dimension of session or if its dismiss its assigned to personalizations_dismissed_ids.'
Decoded value: show details
'Personalization id. When supplied the id will be assigned to proper personalization_X_ids dimension of session, assigned according to the c_i parameter value.'
Whether the server should respond with a 1 pixel GIF:
- 0 - return text/html [No content]
- 1 - return image/gif [1 pixel GIF]
Override IP.
Override request time. You can use it when importing HTTP logs. Provided value should be in UTC timezone.
Decoded value: 2018-02-24 15:34:48
Override country.
Override city.
Decoded value: New York
Override latitude.
Override longitude.
Whether the user should be tracked anonymously.
- 1 - all IP bytes will be masked (0.0.0.0), GeoIP data below Country level will be anonymized
- 0 - available visitor data will be added to the session
Anonymize device dimensions/attributes and user agent of received request.
Notice: This parameter will have an effect only when uia is set to 1.
- 1 - anonymize 'User-Agent' header and device dimensions/attributes
- 0 - no anonymization will be applied
Indicator of a ping event. Pings update custom variables, custom dimensions and time metrics of the last page view. They help us determine time spent on a page.
- 1 - Periodic heartbeat request (sent every X seconds)
- 2 - Last heartbeat (sent on page unload event)
- 3 - Blur heartbeat (sent on page blur event)
- 4 - Request deanonymizing user
- 5 - Request with page performance metrics
- 6 - Request sent by the user (using ping command)
Unload Event Start - one of the Page Performance Metrics. Designed for the value of PerformanceTiming.unloadEventStart
Unload Event End - one of the Page Performance Metrics. Designed for the value of PerformanceTiming.unloadEventEnd
Redirect Start - one of the Page Performance Metrics. Designed for the value of PerformanceTiming.redirectStart
Redirect End - one of the Page Performance Metrics. Designed for the value of PerformanceTiming.redirectEnd
Secure Connection Start - one of the Page Performance Metrics. Designed for the value of PerformanceTiming.secureConnectionStart
Fetch Start - one of the Page Performance Metrics. Designed for the value of PerformanceTiming.fetchStart
Domain Lookup Start - one of the Page Performance Metrics. Designed for the value of PerformanceTiming.domainLookupStart
Connect Start - one of the Page Performance Metrics. Designed for the value of PerformanceTiming.connectStart
Connect End - one of the Page Performance Metrics. Designed for the value of PerformanceTiming.connectEnd
Request Start - one of the Page Performance Metrics. Designed for the value of PerformanceTiming.requestStart
Response Start - one of the Page Performance Metrics. Designed for the value of PerformanceTiming.responseStart
Response End - one of the Page Performance Metrics. Designed for the value of PerformanceTiming.responseEnd
DOM Loading - one of the Page Performance Metrics. Designed for the value of PerformanceTiming.domLoading
DOM Interactive - one of the Page Performance Metrics. Designed for the value of PerformanceTiming.domInteractive
DOM Content Loaded Event Start - one of the Page Performance Metrics. Designed for the value of PerformanceTiming.domContentLoadedEventStart
DOM Content Loaded Event End - one of the Page Performance Metrics. Designed for the value of PerformanceTiming.domContentLoadedEventEnd
DOM Complete - one of the Page Performance Metrics. Designed for the value of PerformanceTiming.domComplete
Load Event End - one of the Page Performance Metrics. Designed for the value of PerformanceTiming.loadEventEnd
Name of a library used for tracking.
Decoded value: iOs SDK
Version of a library used for tracking. Semantic Versioning format required.
Provides on-demand control of the SessionHash feature (0=disabled, 1=enabled)
When this parameter is not used, processing service will default to the current value from the Privacy tab in global or app settings.
Forces tracker to erase IP information from cip query parameter, common headers and socket address when provided with value 1.
The erasure happens before the processing, so that IP information is not stored.
Headers
Recommended User agent of the browser that sent the request
Response
Request accepted and waiting for processing
Changes
- info
endpoint added
- info