How to implement the Generic Tag via Google Tag Manager

To learn how to implement the Generic tag with the standard method, refer to How to implement the Generic tag

Generic Tag

Please note that by inserting the generic tag directly in GTM, you may experience a flickering effect: by default, tags inserted via GTM are in the pages' </body> tags, whereas AB Tasty recommends you inject your tag as high as possible in the page’s HTML code to limit flickering effects.

Access your AB Tasty account settings and find your AB Tasty tag.

Then, access GTM to create a custom tag:

All_About_Tags_06.png

To apply the AB Tasty tag on all of your website’s pages, follow the steps to create a rule:

All_About_Tags_07.png

Heads up ⚡

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 check the Tracker Name option in the Advanced configuration section and leave the corresponding field blank.

All_About_Tags_08.png

To use Google Tag Manager :

  • if you only have one account: check the box without entering a name ;
  • if you have two or more accounts: check the box and enter a name for each account.

When you link Google Analytics or Universal Analytics and AB Tasty, you must set the Tracker Name option for the account to which you want to send data in Third-party Tools.
If you have only one Google Analytics account, you do not need to enter a tracker name.



This will force the tracker name to the value t0 for Universal Analytics and an empty character string 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 do not know 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 AB Tasty to work with one of these web analytics tools.

Focus on Transaction Tag

There is no risk of flickering for the transaction tag with Google Tag Manager since this does not make any visual change: the tag is there only to gather transaction data.

You can find the transaction tag in your AB Tasty account settings. From here, you can copy it and insert it into Google Tag Manager. Then, in Google Tag Manager, you can create a custom Google Tag Manager tag, and paste it in. Capitalized items are dynamic variables.

Good to know 💡

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.

Was this article helpful?

/