> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orbitforms.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Tag Manager

> Manage all your tracking tags in one place

<img src="https://mintcdn.com/orbitai-d647f397/T1yKN7sdBmMTM8cv/_images/integrations/google.svg?fit=max&auto=format&n=T1yKN7sdBmMTM8cv&q=85&s=b48c316782bb71ee9ad22bc72e1462f3" alt="Google Tag Manager" width="32" height="32" data-path="_images/integrations/google.svg" />

[Visit Google Tag Manager](https://tagmanager.google.com)

<Info>
  **GTM vs. Direct Integration: Which Should You Use?**

  OrbitForms supports both direct tracking (adding GA4, Meta Pixel, etc. directly in form settings) and Google Tag Manager. Choose based on your needs:

  **Use Direct Integration if:**

  * You want quick, simple setup
  * You only need 1-2 tracking pixels
  * You don't have a GTM account

  **Use GTM if:**

  * You want centralized tag management
  * You need multiple tracking tags
  * You want version control & preview

  <Warning>
    **Important:** Don't use both! If you configure GA4 or Meta Pixel in GTM, don't also add them directly in Orbit's form settings. This causes duplicate events.
  </Warning>
</Info>

## Overview

Google Tag Manager (GTM) is a tag management system that lets you manage and deploy tracking tags on your forms without editing code. Once connected, you can add, edit, and disable tags from the GTM interface without making changes to your forms. Use GTM to deploy GA4, Meta Pixel, LinkedIn Insight Tag, conversion pixels, and more—all from one central dashboard.

<CardGroup cols={2}>
  <Card title="Centralized Tags" icon="tag">
    Manage all your tracking codes from one dashboard
  </Card>

  <Card title="Multiple Platforms" icon="layer-group">
    Add GA4, Meta Pixel, LinkedIn, TikTok, and more
  </Card>

  <Card title="No Code Changes" icon="bolt">
    Update tracking without touching your forms
  </Card>

  <Card title="Version Control" icon="gear">
    Preview changes and roll back if needed
  </Card>
</CardGroup>

## How It Works

When you add GTM to your OrbitForms form, here's what happens:

<CardGroup cols={3}>
  <Card title="1. GTM Loads" icon="code">
    When your form loads, the GTM container script is injected automatically.
  </Card>

  <Card title="2. Events Fire" icon="chart-bar">
    Orbit pushes events to the data layer (form view, start, submit).
  </Card>

  <Card title="3. Tags Trigger" icon="bullseye">
    Your configured tags fire based on triggers you set up in GTM.
  </Card>
</CardGroup>

## Step 1: Get Your GTM Container ID

Your GTM Container ID starts with "GTM-" and is found in your Google Tag Manager account. If you don't have an account yet, you'll create one.

<Steps>
  <Step title="Go to Google Tag Manager">
    Open your browser and navigate to the Google Tag Manager website.

    [tagmanager.google.com](https://tagmanager.google.com)
  </Step>

  <Step title="Sign in with your Google account">
    Use your Google account to sign in. This can be any Google account—personal or workspace.
  </Step>

  <Step title="Create or select an account">
    If this is your first time, click "Create Account". Otherwise, select your existing account from the list.
  </Step>

  <Step title="Create a container (if new)">
    If creating new: enter your account name, container name (e.g., "Orbit Forms"), and select "Web" as the target platform.
  </Step>

  <Step title="Find your Container ID">
    Your Container ID is displayed at the top of the workspace page. It looks like GTM-XXXXXXX (7 characters after GTM-).
  </Step>
</Steps>

<Info>
  Need help creating a GTM account? [Google's GTM Setup Guide →](https://support.google.com/tagmanager/answer/6103696)
</Info>

## Step 2: Add GTM to Your Form

Now add your Container ID to your OrbitForms form to start loading GTM.

<Steps>
  <Step title="Open your form in OrbitForms">
    Go to your dashboard and click on the form you want to add GTM to.
  </Step>

  <Step title="Click the 'Integrate' tab">
    In the form editor, find and click the "Integrate" tab at the top.
  </Step>

  <Step title="Find Google Tag Manager">
    Scroll down to find "Google Tag Manager" under the Tracking & Analytics section.
  </Step>

  <Step title="Paste your Container ID">
    Paste your GTM Container ID (e.g., GTM-XXXXXXX) into the input field.
  </Step>

  <Step title="Save your form">
    Click the Save button. GTM will now load whenever your form is viewed.
  </Step>
</Steps>

## Data Layer Events

OrbitForms automatically pushes events to the GTM data layer. You'll use these events to trigger your tags.

| Event Name          | When It Fires                              | Common Use          |
| ------------------- | ------------------------------------------ | ------------------- |
| `orbit_form_view`   | When a visitor loads your form             | Page view tracking  |
| `orbit_form_start`  | When a user interacts with the first field | Engagement tracking |
| `orbit_form_submit` | When a user submits the form               | Conversion tracking |

### Data Layer Variables

Each event includes additional data you can use in your tags:

| Variable    | Description                      | Example Value     |
| ----------- | -------------------------------- | ----------------- |
| `form_slug` | The unique URL slug for the form | `contact-us`      |
| `form_name` | The display name of the form     | `Contact Us Form` |

### Using Variables in GTM

To use these variables in your tags, create Data Layer Variables in GTM:

1. Go to Variables → New → Data Layer Variable
2. Set the Data Layer Variable Name to `form_slug` or `form_name`
3. Use the variable in your tags as `{{form_slug}}` or `{{form_name}}`

<Tip>
  The `orbit_form_submit` event is the most important—use this to trigger your conversion tracking tags in GTM. Use `form_name` to pass the form name to your analytics for better reporting.
</Tip>

## Step 3: Create Triggers in GTM

Triggers tell GTM when to fire your tags. Create a trigger for the Orbit form submit event.

<Steps>
  <Step title="Go to Triggers in GTM">
    In your GTM container, click "Triggers" in the left sidebar menu.
  </Step>

  <Step title="Create a new trigger">
    Click the "New" button in the top right corner to create a new trigger.
  </Step>

  <Step title="Name your trigger">
    Give it a clear name like "Orbit Form Submit" so you can easily identify it later.
  </Step>

  <Step title="Click to configure trigger">
    Click on the trigger configuration area to select the trigger type.
  </Step>

  <Step title="Select &#x22;Custom Event&#x22;">
    Scroll down and select "Custom Event" from the list of trigger types.
  </Step>

  <Step title="Enter the event name">
    In the "Event name" field, enter exactly: `orbit_form_submit` (must match exactly).
  </Step>

  <Step title="Save the trigger">
    Click "Save" in the top right corner. Your trigger is now ready to use.
  </Step>
</Steps>

<Warning>
  **Important:** The event name must be typed exactly as `orbit_form_submit` (lowercase, with underscores). Any typo will prevent the trigger from firing.
</Warning>

## Step 4: Create Tags

Tags are the actual tracking codes that fire. Here's how to create a tag and connect it to your trigger.

<Steps>
  <Step title="Go to Tags in GTM">
    Click "Tags" in the left sidebar menu.
  </Step>

  <Step title="Create a new tag">
    Click the "New" button to create a new tag.
  </Step>

  <Step title="Name your tag">
    Give it a descriptive name like "GA4 - Form Submit Conversion" or "Meta Pixel - Lead".
  </Step>

  <Step title="Configure the tag">
    Click "Tag Configuration" and select your tag type (GA4 Event, Meta Pixel, etc.).
  </Step>

  <Step title="Set up the tag details">
    Configure the tag with your tracking ID and event parameters. Each platform has different settings.
  </Step>

  <Step title="Add the trigger">
    Click "Triggering" at the bottom and select the "Orbit Form Submit" trigger you created.
  </Step>

  <Step title="Save the tag">
    Click "Save" to save your tag. Repeat for any additional tags you want to fire.
  </Step>
</Steps>

### Common Tag Examples

<CardGroup cols={2}>
  <Card title="GA4 Conversion" icon="chart-line">
    * Tag type: Google Analytics: GA4 Event
    * Event name: generate\_lead or form\_submit
    * Trigger: Orbit Form Submit
  </Card>

  <Card title="Meta Pixel Lead" icon="meta">
    * Tag type: Meta Pixel (Custom Template)
    * Event: Lead
    * Trigger: Orbit Form Submit
  </Card>
</CardGroup>

## Step 5: Preview and Publish

Before your tags go live, test them with GTM's Preview mode, then publish.

<Steps>
  <Step title="Click Preview">
    In the top right of GTM, click the "Preview" button to enter debug mode.
  </Step>

  <Step title="Enter your form URL">
    Enter the URL where your Orbit form is embedded or the direct form URL.
  </Step>

  <Step title="Test the form">
    A new window opens with your form. Fill out and submit the form to test.
  </Step>

  <Step title="Verify tags fired">
    Back in the Tag Assistant panel, look for "orbit\_form\_submit" in the event list. Check that your tags show as "Fired".
  </Step>

  <Step title="Publish your container">
    Once verified, close Preview mode. Click "Submit" then "Publish" to make your tags live.
  </Step>
</Steps>

## Verifying Your Setup

After publishing, confirm everything is working:

* Load your form in a browser (use incognito to avoid caching)
* Submit a test entry
* Check GA4 Realtime or your ad platform for the conversion
* Verify the event appears within a few minutes

## Troubleshooting

<AccordionGroup>
  <Accordion title="Tags not firing?">
    Make sure you've published your GTM container after making changes. Unpublished changes only work in Preview mode. Click Submit → Publish.
  </Accordion>

  <Accordion title="Invalid Container ID?">
    Make sure your ID starts with "GTM-" followed by 7 characters (e.g., GTM-XXXXXXX). Copy directly from your GTM dashboard.
  </Accordion>

  <Accordion title="orbit_form_submit not appearing in Preview?">
    The event only fires when the form is actually submitted. Make sure you fill out the form completely and click the submit button.
  </Accordion>

  <Accordion title="Trigger created but not matching?">
    Event names are case-sensitive. Make sure you typed `orbit_form_submit` exactly—all lowercase with underscores.
  </Accordion>
</AccordionGroup>

## Important Notes

<Warning>
  **Avoid duplicate tracking:** If you add GA4 or Meta Pixel through GTM, don't also add them directly in the Orbit form settings. This will cause duplicate events and skew your data.

  Choose one method: either use GTM for all your tags, or add each tracking pixel directly in Orbit's integration settings—not both.
</Warning>

## Resources

<CardGroup cols={2}>
  <Card title="Google Tag Manager Dashboard" icon="link" href="https://tagmanager.google.com">
    Access your GTM containers
  </Card>

  <Card title="GTM Setup & Install Guide" icon="book" href="https://support.google.com/tagmanager/answer/6103696">
    Google's official guide
  </Card>

  <Card title="Preview & Debug Your Tags" icon="bug" href="https://support.google.com/tagmanager/answer/6107056">
    Google's debugging guide
  </Card>

  <Card title="GTM Developer Documentation" icon="code" href="https://developers.google.com/tag-platform/tag-manager/web">
    Developer reference
  </Card>
</CardGroup>

***

**Ready to Track Your Forms?** Set up Google Tag Manager in minutes and manage all your tracking from one place. [Get Started](https://orbitforms.ai/signin)
