Set up Transaction Tag with Google Tag Manager

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 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.

Prerequisites

  • A Google Tag Manager account (free) with your configured variables

  • AB Tasty platform access

  • Published AB Tasty campaign (optional, for validation)

1

Log in to your GTM account.

2

Go to Tags > New

3

Enter your Tag name

4

Click Tag Configuration

5

Select Custom HTML tag type

6

Add <script></script> tags

7

Paste the AB Tasty transaction tag script between the <script> tags

Capitalized items are dynamic variables.

8

Replace all placeholder values based on your data layer variables configuration.

Only Transaction Affiliation, ID and Revenue are required.

9

Make sure you have applied the appropriate format to your values, as described in the developer's documentation.

If the ICN (Item Count Number) parameter is not already available as a data layer variable, you might need to create a short JavaScript Code to calculate it

10

If you want to collect data at Item level

  1. Add the dedicated template from the developers' documentation

  2. Match the variables according to the data layer

Keep in mind that one item in the order = one request

11

Once the script is done, select your triggering:

  1. Click on the Triggering area

  2. In the opening menu, select the purchase event as a trigger: event equals purchase

  3. Optionnal: add a Blocker if the consent is not granted for AB TAsty cookies.

12

Click Save.

13

To QA

  1. Click Preview.

  2. Go to your website’s order confirmation (thank you) page.

  3. Open your browser’s Developer Tools (usually F12).

  4. Go to the Network tab.

  5. Place a test order (or simulate one if possible).

  6. Look for a request to ariane.abtasty.com—this is the endpoint where transaction data is sent.

  7. Check the request payload for transaction details (transaction ID, amount, items, etc.)

Last updated

Was this helpful?