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

# Configuring UTMs

> Nemu's tracking standard coexisting with the UTMs already used in GA4 (Meta, Google and TikTok)

## Context

In the Bucket integration, the standard UTM fields (`utm_source`, `utm_medium`, `utm_campaign`, `utm_content`) are usually **already in use by the client's GA4 and must not be changed**. The only free field for Nemu's attribution is **`utm_term`**.

That's why all attribution data (source, campaign, ad set and creative) is **packed into a single `utm_term`**, which the client's GA4 captures and passes on to Nemu.

## How the configuration works

Each channel (Meta, Google, TikTok) sends the packed `utm_term` in the destination URL. All of Nemu's attribution data (source, campaign, ad set and creative) is concatenated into this single field, which the client's GA4 captures and sends back to Nemu, which then unpacks it and rebuilds each piece of information.

<Info>
  The `utm_source`, `utm_medium`, `utm_campaign` and `utm_content` fields stay
  as they are today, unchanged. They belong to the client's GA4 and must not be
  touched.
</Info>

## Where to configure

All of this configuration is done **inside each platform's ads manager**, in the URL parameters / tracking field. There are no changes to the client's website or checkout: the parameters are appended to the destination URL by the ads platform itself.

| Platform | Path in the ads manager |
| - | - |
| **Meta** | Campaigns → **Ads** tab → select the ads → **Edit** → at the bottom of the page, **"URL parameters"** field → paste the configuration → **Publish**. |
| **Google** | **Settings** → **Account settings** → enable **Auto-tagging** → **Tracking** (tracking template) → paste the configuration → **Save**. |
| **TikTok** | Campaigns → **Ads** → edit the ad → disable **"Automatically add URL parameters"** → **Edit URL parameters** → under **Custom parameters**, add each pair → **Apply**. |

## Parameters per platform

On each platform, paste the corresponding `utm_term` parameter:

### Meta

```text Meta: wrap theme={null}
utm_term=source~facebook~~campaign~{{campaign.name}}|{{campaign.id}}~~adset~{{adset.name}}|{{adset.id}}~~content~{{ad.name}}|{{ad.id}}
```

### Google

```text Google: wrap theme={null}
utm_term=source~google~~campaign~{campaignid}~~adset~{adgroupid}_{assetgroupid}~~content~{creative}~~term~{keyword}
```

### TikTok

```text TikTok: wrap theme={null}
utm_term=source~tiktok~~campaign~__CAMPAIGN_NAME__%7C__CAMPAIGN_ID__~~adset~__AID_NAME__%7C__AID__~~content~__CID_NAME__%7C__CID__
```

## Field map (reference)

| Nemu field | Meta | Google | TikTok |
| - | - | - | - |
| `source` | `facebook` | `google` | `tiktok` |
| `campaign` | `{{campaign.name}}\|{{campaign.id}}` | `{campaignid}` | `__CAMPAIGN_NAME__%7C__CAMPAIGN_ID__` |
| `adset` | `{{adset.name}}\|{{adset.id}}` | `{adgroupid}_{assetgroupid}` | `__AID_NAME__%7C__AID__` |
| `content` | `{{ad.name}}\|{{ad.id}}` | `{creative}` | `__CID_NAME__%7C__CID__` |
| `term` | - | `{keyword}` | - |

## Implementation notes

<Warning>
  **A single field.** All of Nemu's attribution is concatenated into
  `utm_term`. This is the field GA4 captures and passes on to Nemu, so it must
  be filled in on **every destination URL**.
</Warning>

<Warning>
  **Don't change the other UTMs.** `utm_source`, `utm_medium`, `utm_campaign`
  and `utm_content` stay as they're already configured in the client's GA4.
</Warning>
