> For the complete documentation index, see [llms.txt](https://docs.abtasty.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.abtasty.com/account/how-to-implement-the-transaction-tag/set-up-transaction-tag-with-google-tag-manager.md).

# Set up Transaction Tag with Google Tag Manager

{% hint style="info" %}
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.
{% endhint %}

{% hint style="success" %}
[Check our video for a guided Tutorial](/account/how-to-implement-the-transaction-tag.md).
{% endhint %}

#### Prerequisites

* A [Google Tag Manager account](https://tagmanager.google.com/#/home) (free) with your configured variables
* AB Tasty platform access
* Published AB Tasty campaign (optional, for validation)

{% stepper %}
{% step %}
Log in to your GTM account.
{% endstep %}

{% step %}
Go to Tags > **New**
{% endstep %}

{% step %}
Enter your Tag name
{% endstep %}

{% step %}
Click **Tag Configuration**
{% endstep %}

{% step %}
Select **Custom HTML tag type**
{% endstep %}

{% step %}
Add `<script></script>` tags
{% endstep %}

{% step %}
Paste the [AB Tasty transaction tag script](/client-side/data-apis/universal-collect/uc-hits.md#transaction) between the \<script> tags

{% hint style="info" %}
Capitalized items are dynamic variables.
{% endhint %}
{% endstep %}

{% step %}
Replace all placeholder values based on your data layer variables configuration.

{% hint style="info" %}
Only Transaction Affiliation, ID and Revenue are required.
{% endhint %}
{% endstep %}

{% step %}
Make sure you have applied the appropriate format to your values, as described in t[he developer's documentation.](/client-side/data-apis/universal-collect/uc-hits.md#transaction)

{% hint style="info" %}
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
{% endhint %}
{% endstep %}

{% step %}
If you want to collect data at Item level

1. &#x20;Add the dedicated template from [the developers' documentation](/client-side/data-apis/universal-collect/uc-hits.md#item)&#x20;
2. Match the variables according to the data layer

{% hint style="info" %}
Keep in mind that one item in the order = one request
{% endhint %}
{% endstep %}

{% step %}
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.&#x20;
   {% endstep %}

{% step %}
Click Save.&#x20;
{% endstep %}

{% step %}
To QA

1. &#x20;Click **Preview**.
2. &#x20;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.)

{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.abtasty.com/account/how-to-implement-the-transaction-tag/set-up-transaction-tag-with-google-tag-manager.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
