Manual track request
When tracking dynamic website content (e.g., loaded by Ajax, Single Page Applications) the automatic tracking of pages and events is not working. Thus, the tracking pixel has to be sent manually whenever an event is triggered. You can also link this function, for example, directly to the "onclick" event of an element.
Any kind of pixel parameters can be passed to the function calls. The parameter names correspond with those of the script parameters. Please review the parameters in the respective document for details.
Page or Event-Requests
When sending the tracking pixel, you generate a page or event request based on the parameters that have been set.
- If you would like to simulate a page request, use the value "page".
Typical example: Product added to the shopping cart. - If you wish to track a clicked link, which causes a new page to be loaded, use the value "link".
Typical example: Teaser-Tracking on the homepage. - If you would like to track the actions on your page, which do not result in the current page being left, use the value "click".
Typical example: Share-Button on an article page.
With these options, only the passed parameters are sent in the object. In other words, parameters and plug-ins configured via Tag Integration are NOT checked or executed.
Page Update
If the content of your page has changed and information configured in Tag Integration should also be sent, you can set the value "pageupdate".
All rules and therefore also plug-ins are checked and executed with each "pageupdate".
If you use the option "pageupdate", all currently defined parameters will be sent, which means no new pixel object will be generated. If you wish to send other parameters, as with the previous request, you have to overwrite them with an empty string!
Example
You are on the product detail page, where you click on "Products in shopping cart" (Ajax button, which loads an overlay instead of generating a page reload).
Parameters | On the product detail page | within the request in overlay |
---|---|---|
contentId | "en.pants.product_detail" | "en.basket" |
product | "126323_Jeans" | "126323_Jeans" |
productStatus | "view" | "add" |
productQuantity | 1 | 1 |
Examples for tracking requests
Page-request for the page "homepage"
wts.push(["send", "page", {
contentId: "homepage"
}]);
Page-request for product added to the shopping cart
wts.push(["send", "page", {
contentId: "basket",
contentGroup: {
1: "Checkout"
},
product: "1666849",
productStatus: "add",
customEcommerceParameter: {
1: "yellow",
2: "XL"
}
}]);
Page update-request without additional parameters
All parameters will be taken from the previous request.
wts.push(["send", "pageupdate"]);
Event-request for event "share"
wts.push(["send", "click", {
linkId: "share"
}]);
Event-request for teaser-tracking
wts.push(["send", "link", {
linkId: "homepage-main_teaser",
customClickParameter: {
1: "teaser-bike",
2: "position-1"
}
}]);