> For the complete documentation index, see [llms.txt](https://docs.patagon.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.patagon.ai/en/marketing-and-attribution/google-campaigns/google-utm-tracking.md).

# How to set up Google Ads attribution (UTMs)

For Patagon AI to attribute your Google **landing → WhatsApp** campaigns, two things have to reach your landing page on every ad click: the **`gclid`** (Google's click ID) and your **UTM parameters**. The Patagon AI script on the page captures both.

Patagon AI orders attribution data by the UTM hierarchy: `utm_source` → `utm_medium` → `utm_campaign` → `utm_content` → `utm_term`.

## 1. Enable auto-tagging (captures the `gclid`)

Auto-tagging is what makes Google append the `gclid` to every ad click. It's required for Patagon AI to capture it.

1. Go to **Admin → Account settings**.
2. Open the **Auto-tagging** container.
3. Turn on **"Tag the URL that people click through from my ad"** and click **Save**.

![Enable auto-tagging in Account settings](/files/U2cvzyk0D7Oid7YFHFCi)

{% hint style="info" %}
Capturing the `gclid` matters today for attribution, and it's also what will let Patagon AI send qualified-lead conversions back to Google once Google offline conversions ship.
{% endhint %}

## 2. Add your UTM parameters with a final URL suffix

You set UTMs using a **final URL suffix**, which Google appends to your landing page URL. You can set it at two levels — choose based on whether you want to see **names** or are fine with numeric **IDs** in Patagon AI.

{% hint style="warning" %}
Google's ValueTrack has tokens for campaign and ad group **IDs** (`{campaignid}`, `{adgroupid}`) but not for their **names**. To show names in Patagon AI, you type them in manually and **URL-encode** them (e.g. `Campaign 1` → `Campaign%201`).
{% endhint %}

### Option A: Ad group level (shows names)

Use this if you want to see your campaign and ad group **names** in Patagon AI.

1. Go to **Campaigns → Ad groups**.
2. Hover the ad group, click the **⚙ settings** wheel, and choose **Edit settings**.

![Ad groups — open the ad group settings](/files/a8FuxUQkNnn4QgP21dRp)

3. Open **Other settings → Ad group URL options**, and in **Final URL suffix** enter your UTMs.

![Ad group URL options — Final URL suffix](/files/jY5jBC3IIueIIDMvO20Y)

```
utm_source=google&utm_medium=cpc&utm_campaign=Campaign%201&utm_content=Ad%20group%201&utm_term={keyword}
```

| Parameter      | Value                                                                                                          |
| -------------- | -------------------------------------------------------------------------------------------------------------- |
| `utm_source`   | `google`                                                                                                       |
| `utm_medium`   | `cpc`                                                                                                          |
| `utm_campaign` | your campaign name, **URL-encoded** (e.g. `Campaign%201`) — or `{campaignid}` for the numeric ID               |
| `utm_content`  | your ad group name, **URL-encoded** (e.g. `Ad%20group%201`)                                                    |
| `utm_term`     | `{keyword}` (the keyword that triggered the click) or `{creative}` (the ID of the ad that triggered the click) |

In Patagon AI this shows up as: **google → cpc → Campaign 1 → Ad group 1 → keyword**.

The tradeoff: you set this **per ad group** and re-encode the names yourself, so it's more manual — but you get readable names.

### Option B: Account level (uses IDs, applies everywhere)

Use this if you don't need names and want a single global setup. It relies entirely on ValueTrack, so Patagon AI will show numeric IDs instead of names.

1. Go to **Admin → Account settings**.
2. In the **Tracking** section, enter your UTMs in **Final URL suffix** and save.

![Account settings — Tracking → Final URL suffix](/files/EqsHj5oaf30UvP5UQUxe)

```
utm_source=google&utm_medium=cpc&utm_campaign={campaignid}&utm_content={adgroupid}&utm_term={keyword}
```

| Parameter      | Value                                                  |
| -------------- | ------------------------------------------------------ |
| `utm_source`   | `google`                                               |
| `utm_medium`   | `cpc`                                                  |
| `utm_campaign` | `{campaignid}` — the numeric campaign ID, not the name |
| `utm_content`  | `{adgroupid}` — the numeric ad group ID, not the name  |
| `utm_term`     | `{keyword}` or `{creative}`                            |

Simpler (set once for the whole account), but Patagon AI shows IDs rather than names.

## ValueTrack reference

Common ValueTrack parameters you can use in a final URL suffix: `{keyword}`, `{creative}` (the ad ID), `{campaignid}`, `{adgroupid}`, `{network}`, `{device}`. For the complete, up-to-date list, see Google's [ValueTrack parameters documentation](https://support.google.com/google-ads/answer/6305348).


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.patagon.ai/en/marketing-and-attribution/google-campaigns/google-utm-tracking.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
