# Integrate Google Tag Manager

{% embed url="<https://youtu.be/8bHxGeGeM8U>" %}

## What You’ll Need

* Access to your Fibr Dashboard
* A valid Google Tag Manager account
* Access to the appropriate GTM container
* Publishing permissions in GTM

## Step-by-Step Integration Guide

**Step 1:** Navigate to Settings > Integrations on the Left-Hand Menu on the Dashboard.&#x20;

**Step 2:** Click on Connect button on the GTM card.

**Step 2:** Sign up to your Google Account connected to Google Tag Manager(GTM) and allow access when prompted.

{% hint style="info" %}
This method uses **OAuth 2.0 Authorization Code Flow**, a secure industry-standard process. This process is secure, fully compliant with Google’s API policies, and does not expose your credentials to Fibr.
{% endhint %}

Step 4: Select and Link Your GTM Container. Follow these steps to link your GTM container:

* On the GTM connection page, click on the Google Tag Manager button. This will open your GTM dashboard in a new tab.
* Inside GTM, select the container you wish to connect.
* Copy the URL of the container page.
* Paste this URL back into the Fibr dashboard and click Next.

**Step 5:** Review the list of default variables and tags to sync and Approve the list.

**Step 6:** Choose and Approve Fibr events (e.g., impressions, conversions) you’d like GTM to track.

**Step 7:** Publish Your Changes in GTM

* Go back to your GTM Dashboard.
* Open the container you linked.
* Click Submit > Publish > Continue to apply the changes.

**Step 8:** Return to the Fibr dashboard and click Approve to finalize the setup.

## What Fibr Sends to the GTM Data Layer

Once connected, Fibr pushes events to the data layer each time a visitor sees a variantt. These events allow you to route important personalization and experiment data into platforms like GA4, Meta Ads, Mixpanel, and more via GTM.

Event Name: **fibr\_track\_event**

| **Variable**                | **Description**                                 |
| --------------------------- | ----------------------------------------------- |
| fibr\_session\_id           | User session information ID                     |
| fibr\_user\_id              | Fibr unique user ID                             |
| fibr\_variation\_id         | Fibr experience user ID                         |
| fibr\_variation\_name       | Fibr experience name                            |
| fibr\_campaign\_type        | Personalization or Experiment                   |
| fibr\_campaign\_name        | Fibr campaign name                              |
| fibr\_campaign\_id          | Fibr campaign ID                                |
| fibr\_event                 | Always set to fibr\_track\_event                |
| fibr\_workflow\_id          | Fibr workflow ID                                |
| fibr\_campaign\_group\_name | Name of the personalization or experiment group |

These variables are automatically added to your GTM container during the integration process and can be used to create:

* Data Layer Variables
* Triggers
* Custom Tags

This setup gives you full control to build cross-platform tracking and analytics workflows using the data Fibr provides.


---

# 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://support.fibr.ai/integrations/integrate-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.
