Careful, by inserting the generic tag directly in GTM, you may see a flickering effect: by default, tags inserted via GTM are in the pages' body tags (AB Tasty recommends you inject your tag as high as possible in the page’s HTML code to limit flickering effects).
How to implement it in GTM
For this, go to your AB Tasty account settings and find your AB Tasty tag.
Then, go to GTM to create a custom tag:
To apply the AB Tasty tag on all of your site’s pages, the following step consists of creating a rule like this:
Careful, if you use Google Tag Manager to apply the Google Analytics or Universal Analytics tag and link the data of your AB Tasty tests: you must tick the “tracker name” box in the “Advanced configuration” section, and leave the corresponding field blank.
There are two possibilities:
- If you only have one account: tick just the box without filling in a name.
- You have 2 or more accounts, tick the box and fill in a name for each of these accounts.
When you link Google Analytics or Universal Analytics and AB Tasty, you must set the “tracker name” for the account to which you want to send data in “Third-party Tools” (if you just have one Google Analytics account, you don't need to enter a name).
This will force the tracker name to the value “t0” for Universal Analytics and to an empty chain of characters for Google Analytics, whilst, with no special configuration, GTM automatically generates the tracker name and includes a different timestamp for each page load.
Our integration with Universal Analytics/Google Analytics calls on analytics.js library methods (for Universal Analytics) and ga.js (for Google Analytics), without passing the tracker name as a parameter, since we don't know it ahead of time if you use GTM.
Without this parameter, the library methods mentioned will only work if the tracker name is t0 or "". Hence the need to modify this setting in your Universal Analytics/Google Analytics tag templates if you want to AB Tasty to work with one of these web analytics tools.
There is no risk of flickering for the transaction tag with GTM, since this doesn't make any visual changes: it is there only to gather transaction data.
How to implement it in GTM
You can find the transaction tag in your AB Tasty account settings. From here, you can copy it and insert it into GTM.Then, in GTM, you can create a custom HTML tag, and paste it in. The items in capitals are dynamic variables.
You can put the generic AB Tasty code directly into your page while still using GTM to insert the transaction tag. In this case, make sure you put the generic AB Tasty tag in between your pages' <head> tags..