Change default events
With Pixel Your Shop it is possible to completely override the standard events for all pixels with your own dynamic code. This also allows special configurations and customer requirements, which are difficult or impossible to implement with conventional plugins.
Tip
You can configure the following steps per sales channel & language individually, which ultimately gives you more flexibility during development.
Short explanation
Each pixel code is dynamically generated in the frontend with Twig. Twig is a simple template language that generates the actual Javascript code for tracking in this case, which the end user of the shop finally triggers.
The advantage of Twig is that dynamic variables such as products
can be used, which are used when generating the tracking code contain the correct product data. Due to the flexible structure, you can easily add custom lines of code or also replace complete scripts.
To edit the code, you have to click on the gear symbol
in the opt-In & event boxes and activate the switch Use own code
then.
Opt-In Variables
Here is a list of the Twig variables that can be used during the opt-in:
Pixel | Variable | Type | Example |
Google gtag | googleAnalyticsTrackingIds | array |
|
Google gtag | googleAdsConversionIds | array |
|
Google gtag | googleAnonymizeIp | bool |
|
Google Tag Manager | googleTagManagerContainerIds | array |
|
facebookPixelIds | array |
| |
Hotjar | hotjarIds | array |
|
Event Variables
Here you find a list of the Twig variables listed per event:
Add to card
Variable | Type | Example |
products | array |
|
totalPrice | int |
|
Begin checkout
Variable | Type | Example |
affiliation | string or null |
|
coupon | string or null |
|
products | array |
|
totalPrice | int |
|
Click product
Variable | Type | Example |
product | object |
|
Login
Variable | Type | Example |
method | string or null |
|
Purchase
Variable | Type | Example |
orderNumber | string |
|
shipping | int |
|
affiliation | string or null |
|
coupon | string or null |
|
products | array |
|
totalPrice | int |
|
totalTax | int |
|
Register
Variable | Type | Example |
method | string or null |
|
Remove from card
Variable | Type | Example |
products | array |
|
totalPrice | int |
|
Search
Variable | Type | Example |
searchTerm | string |
|
View product
Variable | Type | Example |
product | object |
|
View product list
Variable | Type | Example |
products | array |
|
totalPrice | int |
|
View product search
Variable | Type | Example |
products | array |
|
totalPrice | int |
|
searchTerm | string |
|
Last updated