> For the complete documentation index, see [llms.txt](https://docs.insurgrid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.insurgrid.com/intake-forms/tracking-and-analytics.md).

# Tracking & analytics

Your intake form can tell your advertising and analytics tools what is happening on it — that someone opened the form, and that someone finished it. Switch it on and you can answer questions like:

* Which Facebook ad actually produced this week's leads — not just who clicked, but who completed a form.
* How many people open the form compared with how many finish it.
* Whether the landing page you are paying for sends you people who convert.

Without it, your ad platform only ever learns that someone clicked. It never finds out what happened next.

{% hint style="info" %}
Tracking is off until you turn it on, and it is set per form. A form with tracking off loads no advertising code at all.
{% endhint %}

***

## Where the setting lives

1. Open the form in the **form builder**.
2. Click **Tracking** in the row of buttons across the top, next to **Branding** and **Notifications**. A panel opens on the right.
3. Tick **Enable tracking**, fill in at least one of the three boxes, and save.

Only agency **admins and owners** see that button. Everyone else can open the builder but cannot change these settings.

You need at least one of the three: a Meta Pixel ID, a Google Tag Manager container ID, or a custom snippet. Ticking the box with all three empty will not save — you will see "Enabling tracking requires a tracking provider."

The settings apply to people who open the form after you save. If the form is still a draft, publish it.

***

## Meta Pixel — for Facebook and Instagram ads

A **Meta Pixel** is a small piece of code Meta gives you so that Facebook and Instagram can see what people do after they click one of your ads. Each pixel is identified by a number: the Pixel ID.

### Find your Pixel ID

1. Go to **business.facebook.com** and open **Events Manager**.
2. In the left sidebar, click **Data sources**.
3. Your pixel is in that list. Underneath its name is a long number — usually 15 or 16 digits, something like `1234567890123456`. That is the Pixel ID.

If the list is empty, whoever runs your ads has to create a pixel first. Ask them for the number rather than guessing at it.

### Put it in the form

Paste the number into **Meta Pixel ID** and save. Digits only — no spaces, no letters, no "Pixel" in front of it. If you paste anything else, red text appears under the box telling you the ID must be 1–30 digits, and the form will not save until you fix it.

### What InsurGrid then sends Meta

| When                                         | What Meta receives |
| -------------------------------------------- | ------------------ |
| Someone opens your form                      | `PageView`         |
| Someone fills in the first page and it saves | *nothing*          |
| Someone submits the finished form            | `Lead`             |

`Lead` is the event Meta's advertising tools use to count and optimise conversions, so your ad reporting starts showing completed forms rather than only clicks.

**What is never sent:** the answers. No names, no addresses, no dates of birth, no vehicle or property details, no uploaded files. All that travels with an event is the form's public ID — an identifier for the form itself, the same for everyone who fills it in. InsurGrid also switches off Meta's "automatic advanced matching", which would otherwise read what people type into the fields.

### Confirm it is working

Go back to **Events Manager → Data sources**, select your pixel, and open the **Test events** tab. Open your own form in another tab and submit it. One `PageView` should appear when the page loads and one `Lead` when you submit.

Events Manager is where you check this. There is no tracking report inside InsurGrid. The **Overview** tab can lag by several minutes; **Test events** shows events as they arrive.

***

## Google Tag Manager

**Google Tag Manager (GTM)** is a container that sits on a page and holds all of your other tracking tags inside it. Whoever handles your marketing adds and changes tags on Google's website, and those changes go live without anyone touching the form. If your marketing agency has asked you for "the GTM container ID", this is the box it goes in.

### Find your container ID

Sign in at **tagmanager.google.com** and open your container. The ID sits in the bar across the top of the screen, beside the container name, and looks like `GTM-ABC1234`. It always begins with `GTM-`.

### Put it in the form

Paste it into **GTM Container ID** and save. It has to be `GTM-` followed by 4 to 20 capital letters or numbers — lowercase letters or a stray space will be refused with red text under the box.

### What InsurGrid pushes into your container

InsurGrid loads your container on the form and announces three moments to it:

| Event name                 | Happens when                                   |
| -------------------------- | ---------------------------------------------- |
| `insurgrid_form_view`      | Someone opens the form.                        |
| `insurgrid_form_started`   | Someone completes the first page and it saves. |
| `insurgrid_form_completed` | Someone submits the finished form.             |

Inside GTM, your marketing person creates **Custom Event** triggers using those exact names and points whichever tags they like at them — a Google Ads conversion, GA4, LinkedIn, and so on. As with Meta, no answers are included; only the event name and the form's public ID.

The middle event is the one that tells you how many people begin the form and never finish it.

### Confirm it is working

In GTM, click **Preview** at the top right and enter your form's public link. A second window opens with your form in it, plus a Tag Assistant panel. Step through the form there. Events appear in a list down the left-hand side as they happen: `insurgrid_form_view` when the page loads, `insurgrid_form_completed` once you submit. Clicking an event shows which of your tags fired on it.

***

## Custom tracking snippet

**This box is for a developer.** If you are not one, do not fill it in yourself — the wrong code here runs on the page your real customers are using.

It exists for tracking tools that are neither Meta nor GTM: a call-tracking product, a different ad network, your own analytics. Those vendors hand you a snippet of code and tell you to install it on your website; this is where that snippet goes for an InsurGrid form.

**What to do:** send two things to whoever looks after your website — your developer, or your marketing agency. First, the snippet your vendor gave you. Second, a link to [Building a custom tracking script](/intake-forms/tracking-and-analytics/custom-tracking-script.md), which tells them exactly how to hook into the three events above. They can paste the finished snippet in themselves, or hand it back for you to paste.

What the box will and will not take, in plain terms:

* Only `<script>` tags. Other kinds of HTML are refused.
* Any address a script loads from must start with `https://`.
* 10,000 characters maximum — roughly two printed pages of code.
* A short list of unusual coding patterns is refused outright, which rules out a small number of vendor snippets. A developer can almost always work around it.

If what you paste is not acceptable, saving fails and an error explains what was rejected. Nothing is half-applied. That check is a safety rail rather than a review: the code still runs on a page where your customers are typing personal information, so only paste code from a vendor you trust.

***

## How do I know it is working?

1. Publish the form, if it is not published already.
2. Open its public link yourself, in an ordinary browser window.
3. Fill it in and submit it properly, all the way through to the confirmation screen. A half-finished form is not a completion and will not produce a `Lead`.
4. Check **Meta Events Manager → Test events**, or **GTM Preview** — whichever you set up.

{% hint style="info" %}
**Each event counts once per visit.** Reloading the page, or filling the form in again in the same browser window, will not produce a second event. That is deliberate, so one person cannot inflate your numbers. To test a second time, open a **new incognito or private window** — that starts a fresh session and the events fire again.
{% endhint %}

A few other things worth knowing while you test:

* On forms that hand the customer over to their insurance carrier to log in, the completion event fires when they come back to the confirmation page, not at the moment they leave.
* Ad blockers and stricter privacy settings block Meta and Google outright for some visitors. Nothing arrives for those people, and that is outside InsurGrid's control — expect your tracked totals to sit a little below your real submission count.
* If you change a Pixel ID or container ID later, the new setting applies to people who open the form after you save.

***

## Related

* [Building a custom tracking script](/intake-forms/tracking-and-analytics/custom-tracking-script.md) — for your developer, if you are using the custom snippet box.
* [Webhook events & payloads](/api-reference/webhook-events.md) — how the actual answers reach your systems.
* [Submissions API](/intake-forms/submissions.md) — pull submissions on demand.
* [Embed a form](/intake-forms/b-embed-form.md) — putting the form in your own website or app.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.insurgrid.com/intake-forms/tracking-and-analytics.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
