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

# GTM Pixel

> Install the Octanist pixel through GTM.

Use this setup when you want Google Tag Manager to load the Octanist pixel on your website. The pixel tracks sessions, page views, attribution parameters, and can optionally detect forms.

If your website already pushes lead data into the dataLayer and you want GTM to send lead events directly, use [GTM DataLayer](/docs/incoming-integrations/gtm) instead.

## Get your pixel script

1. Open Octanist.
2. Go to **Settings > Tracking**.
3. Copy the pixel script.

<Frame>
  <img src="https://mintcdn.com/octanist/mtmxDnNbBlP0vRFq/images/google-tag-manager/gtm-pixel-copy-script.jpg?fit=max&auto=format&n=mtmxDnNbBlP0vRFq&q=85&s=76a19bbde60dcab654fc1a5f908d7e28" alt="Copy the Octanist pixel script" width="3106" height="2470" data-path="images/google-tag-manager/gtm-pixel-copy-script.jpg" />
</Frame>

The script looks like this:

```html theme={null}
<script
  src="https://c.octani.st/p"
  data-id="OCT-XXXXXXXX"
  data-consent-mode="auto"
  data-forms="true"
></script>
```

## Create a GTM tag

1. Open Google Tag Manager.
2. Open your website container.
3. Go to **Tags**.
4. Click **New**.

<Frame>
  <img src="https://mintcdn.com/octanist/mtmxDnNbBlP0vRFq/images/google-tag-manager/gtm-pixel-new-tag.jpg?fit=max&auto=format&n=mtmxDnNbBlP0vRFq&q=85&s=0d095d997aadb2efde10ecba7c004bad" alt="Create a new GTM tag" width="3604" height="1258" data-path="images/google-tag-manager/gtm-pixel-new-tag.jpg" />
</Frame>

5. Name the tag **Octanist Pixel**.
6. Choose **Tag Configuration > Custom HTML**.

<Frame>
  <img src="https://mintcdn.com/octanist/mtmxDnNbBlP0vRFq/images/google-tag-manager/gtm-pixel-custom-html.jpg?fit=max&auto=format&n=mtmxDnNbBlP0vRFq&q=85&s=675e808362c43f2b6591fa7b90d8204c" alt="Choose the Custom HTML GTM tag type" width="3598" height="1794" data-path="images/google-tag-manager/gtm-pixel-custom-html.jpg" />
</Frame>

7. Paste the pixel script from Octanist.
8. Set the trigger to **All Pages**.

<Frame>
  <img src="https://mintcdn.com/octanist/mtmxDnNbBlP0vRFq/images/google-tag-manager/gtm-pixel-all-pages-trigger.jpg?fit=max&auto=format&n=mtmxDnNbBlP0vRFq&q=85&s=28c0f6a96ae16bd68cc7cdedafe0c7d1" alt="Set the GTM trigger to All Pages" width="3604" height="2464" data-path="images/google-tag-manager/gtm-pixel-all-pages-trigger.jpg" />
</Frame>

9. Save the tag.

<Frame>
  <img src="https://mintcdn.com/octanist/mtmxDnNbBlP0vRFq/images/google-tag-manager/gtm-pixel-save-tag.jpg?fit=max&auto=format&n=mtmxDnNbBlP0vRFq&q=85&s=6f0ba6a81d0013afa82bd82fc43aa200" alt="Save the Octanist Pixel GTM tag" width="3606" height="2448" data-path="images/google-tag-manager/gtm-pixel-save-tag.jpg" />
</Frame>

## Publish and test

1. Click **Preview** in GTM.
2. Enter your website URL and connect Tag Assistant.
3. Confirm the **Octanist Pixel** tag fires on the page.
4. Submit a test form if `data-forms="true"` is enabled.
5. Publish the GTM container.
6. Open Octanist and verify the setup status or test lead.

<Frame>
  <img src="https://mintcdn.com/octanist/mtmxDnNbBlP0vRFq/images/google-tag-manager/gtm-pixel-submit-container.jpg?fit=max&auto=format&n=mtmxDnNbBlP0vRFq&q=85&s=b5d4d99efed8e5fd9ff65c138d12c476" alt="Submit the GTM container after creating the Octanist Pixel tag" width="3624" height="1082" data-path="images/google-tag-manager/gtm-pixel-submit-container.jpg" />
</Frame>

## Avoid duplicate form captures

If another Octanist integration already sends the same form submissions, remove `data-forms="true"` from the pixel script before adding it to GTM.

Use only one form capture method per form:

* Browser-side pixel form detection through `data-forms="true"`
* Server-side form capture through your backend
* WordPress server-side capture through the Octanist plugin
* GTM DataLayer lead sending

The pixel can still inject the hidden session field without `data-forms="true"`, so [server-side form capture](/docs/incoming-integrations/server-side-capturing) can link form submissions to the same session.

If you only need to exclude one specific form, add `data-octa-ignore` to that form instead of removing `data-forms="true"` from the site-wide pixel:

```html theme={null}
<form data-octa-ignore>
  <!-- fields -->
</form>
```

This is useful for login, checkout, account, sensitive, or manually tracked JavaScript forms.

## Custom JavaScript forms

If your website needs to send a form submission from custom JavaScript, use the [Client-side API](/docs/incoming-integrations/client-side-api). Mark that form with `data-octa-ignore` so automatic browser capture does not also send it.
