# Set up the AB Tasty Tag with Google Tag Manager

{% hint style="info" %}
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.\
To learn how to implement the **Generic** **tag** with the standard method, refer to **How to implement the Generic tag**.
{% endhint %}

#### Prerequisites

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

## Create your Tag in Google Tag Manager

{% stepper %}
{% step %}
Copy your AB Tasty tag.

1. Go to the [Tag implementation page](https://app2.abtasty.com/settings/installation-code/tag).
2. Enter a Domain[^1].
3. On the Implement the AB Tasty Tag field, select **Standard**.
4. Copy the AB Tasty Synchronous tag script from the platform
   {% endstep %}

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

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

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

{% step %}
Paste your AB Tasty tag script into the HTML field.
{% endstep %}

{% step %}
To apply the AB Tasty Tag on all your website's pages, create a Rule

1. Select **Choose from existing rules**
2. Select **All Pages**.
3. Click **Save**.
   {% endstep %}

{% step %}
If you use Google Tag Manager to apply the Google Analytics or Universal Analytics tag and link the data of your AB Tasty tests:&#x20;

1. In the **Advanced configuration** section, check the **Tracker Name** option
2. Leave the corresponding field blank
   {% endstep %}
   {% endstepper %}

## Publish Your Container

1. In the GTM workspace, click **Submit**.
2. Add a version name (e.g., "Add AB Tasty tag") and publish your container.

[^1]: Your domain is everything that goes before the first slash (the path) and after the potential subdomains.\
    Hence, if you want to implement your tag on[ www.my-website.com/fr](http://www.my-website.com/fr) , then the domain you need to set here is "my-website.com".


---

# Agent Instructions: 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:

```
GET https://docs.abtasty.com/account/tag-integration/implement-ab-tasty-tag/set-up-the-ab-tasty-tag-with-google-tag-manager.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
