# Google Tag Manager

<figure><img src="https://951987241-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVPontcfIF8v0iocPko5l%2Fuploads%2FnwbiTkj5sIRs2xYKvH2R%2Feojrfrebverj.png?alt=media&#x26;token=56f27768-e6f2-4c4c-aa03-b1ab171e7dfd" alt=""><figcaption></figcaption></figure>

When enabled, Zellify automatically pushes structured events to the dataLayer as users interact with your funnels.

This allows you to:

* Forward events to Google Analytics, Google Ads, or any third-party tool configured in GTM
* Set up conversion tracking without modifying funnel code
* Manage all tags and pixels from a single GTM container
* Build custom triggers based on funnel progression and payment events

If you use Google Tag Manager to manage tracking and marketing tags, this integration ensures all funnel data is automatically available in the dataLayer.

***

## Enabling the Integration

GTM is configured per campaign.

<figure><img src="https://951987241-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVPontcfIF8v0iocPko5l%2Fuploads%2FB9Y58RO3lP9lvCZLQ0hG%2Feiuvirwb.png?alt=media&#x26;token=5e6a6526-ab27-49a5-9fc1-fda3b8dd0e48" alt=""><figcaption></figcaption></figure>

To enable GTM on a campaign:

1. Open a **Campaign** in the Zellify dashboard
2. Go to **Campaign Settings**
3. Toggle on **Enable Google Tag Manager**
4. Enter your **GTM Container ID** (for example: GTM-XXXXXX)

When enabled, the GTM container is automatically loaded on all funnel pages within that campaign.

This is configured per campaign, allowing you to use different GTM containers for different funnels.

***

### Finding Your GTM Container ID

To find your Container ID:

1. Go to tagmanager.google.com
2. Select your account and container
3. Locate your **Container ID** at the top of the workspace (e.g. GTM-XXXXXX)
4. Copy the ID and paste it into Zellify

<figure><img src="https://951987241-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVPontcfIF8v0iocPko5l%2Fuploads%2Fz44K7y0E77O2U6NAqEIe%2Fimage.png?alt=media&#x26;token=47989533-7c50-4eea-9f4d-026809236285" alt=""><figcaption></figcaption></figure>

***

## Data Sent to the dataLayer

When GTM is enabled, Zellify pushes structured events to the dataLayer as users move through your funnel.

Each event includes:

* An **event name**
* A **timestamp**
* A **data object** (event-specific data)
* A **context object** (funnel and session metadata)

***

## Events

Below is the full list of events pushed to the dataLayer.

| Event Name             | When It Fires                            |
| ---------------------- | ---------------------------------------- |
| page\_view             | A funnel page is viewed                  |
| lead                   | A lead event is triggered                |
| page\_completed        | A user navigates away from a funnel page |
| email\_captured        | A user submits their email               |
| checkout\_presented    | The checkout or payment form is shown    |
| payment\_method\_added | A user enters their payment method       |
| payment\_succeeded     | A payment completes successfully         |
| payment\_failed        | A payment fails                          |
| trial\_started         | A free trial begins                      |
| subscription\_started  | A paid subscription begins               |

***

## Context Properties

Every event includes a **context object** with the following properties:

| Property       | Description                           |
| -------------- | ------------------------------------- |
| page\_location | Current page URL                      |
| page\_title    | Current page title                    |
| page\_slug     | Current page slug                     |
| funnel\_id     | Funnel identifier                     |
| campaign\_id   | Campaign identifier                   |
| experiment\_id | Experiment identifier (if applicable) |
| external\_id   | Session ID                            |
| fbp            | Facebook browser pixel ID             |
| fbc            | Facebook click ID                     |

These properties allow you to attribute events to specific funnels, campaigns, experiments, and sessions.

***

## Funnel Interaction Data

For the following events:

* page\_completed
* email\_captured

The **data object** contains the user’s funnel answers and form responses.

This allows you to create GTM triggers based on specific answers or user attributes.

***

## Payment Event Data

For the following events:

* checkout\_presented
* payment\_method\_added
* payment\_succeeded
* trial\_started
* subscription\_started

The **data object** contains:

* Checkout session or transaction ID
* Total amount (decimal format, e.g. 9.99)
* Currency code
* Product category (if set)
* Array of purchased items

Each item includes:

* productId
* priceId
* price (decimal format)
* quantity
* paymentType (recurring or one\_time)
* name (if set)

This makes it possible to send accurate revenue and product-level data to GA4, Google Ads, or any other GTM-supported destination.

***

## Using These Events in GTM

To use these events in Google Tag Manager:

1. Create a **Custom Event trigger** for the event you want to capture (for example: payment\_succeeded)
2. Create **Data Layer Variables** to extract values from the data and context objects (for example: value, funnel\_id, productId)
3. Configure your tags (Google Ads conversions, GA4 events, etc.) using those triggers and variables

This gives you full flexibility to forward funnel data to any destination supported by GTM.
