Defining a trigger means selecting a trigger already created or creating a new one. A trigger is made of one or more triggering conditions based on information linked to the session or the present moment. Triggers are split between the following categories: Browser, Expert, Visitors, Source, Devices and Visitors behavior.
The Data layer trigger enables you to display or hide a variation from users as a function of the page they are viewing or the actions they carry out on your website based on the data available in your data layer.
In order to be able to use this trigger, you need to configure your data layer via your account settings.
Accessing the trigger
To access the Data layer trigger, apply the following steps:
- In the Targeting step of your campaign, click How to trigger the test / subtest / scenario.
- Open the dropdown.
- Select create new trigger from the drop-down list. On overlay appears.
- Inside the "expert" section, you will find the Data layer criteria. You can drag and drop it inside the middle column to use it
If you’ve configured one of the tag management solutions supported by AB Tasty (i.e. TagCommander, Tealium or Google Tag Manager), its name is coupled with the Data layer targeting criterion.
The information included in your data layer coincides with a type of data or actions related to a variable or a label. It is available in the form of a key and a value in the targeting configuration interface.
To configure this key/value pair, apply the following steps:
- In the Key field, enter the type of data you are looking for.
- Select the relevant operator from the drop-down list.
- In the Value field, enter the desired variable.
- If necessary, click Add a condition to configure an additional key/value pair.
- Select the SOME or ALL operator as a function of the desired result.
- Save your changes.
You do not need to be familiar with the structure of your data layer. The keys are collected automatically every 24 hours by the AB Tasty tag and the Key field has an auto-complete feature: the names of all the keys in the data layer are suggested as you type.
You are looking to display a discount coupon for all visitors viewing products worth over $200 in the “Furniture” category.
In your data layer, product prices, for instance, are identified by the product_price key, and product categories by the product_category key.
- In the Key field, enter product_price .
- Select the Higher than operator from the drop-down list.
- Enter 200 in the Value field.
- Click Add a variable.
- In the Key field, enter product_category .
- Keep the equals default operator.
- Enter Furniture in the Value field.
- Select the AND Boolean operator.
- Save your changes.
Specific case of TMS in asynchronous mode
If you decide to implement your TMS in asynchronous mode, this may increase the flickering effect on your website.
This is why, as for the AB Tasty tag, we recommend implementing your TMS and your data layer in synchronous mode or even in server-side mode to avoid all risk of flickering on your website.