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

# Setup UTM parameters

> Learn how to setup UTM parameters effectively for seamless integration with Dema.

## What is UTM?

UTM (Urchin Tracking Module) parameters are tags added to the end of URLs. They track where your users come from and how they interact with your website, tying this information back to specific marketing campaigns.

## Importance of a structured UTM setup

A clear and consistent UTM setup is critical for:

* Accurately attributing traffic sources and marketing spend.
* Measuring the performance of different campaigns.
* Creating actionable insights to optimize your marketing strategy.

<Info>
  **Pro tip**: Always ensure your ads and campaigns are correctly tagged with UTM parameters to get the most out of your data.
</Info>

## Common UTM parameters

Here are the most commonly used UTM parameters:

* `utm_source`: Identifies where the traffic came from (e.g., google, facebook).
* `utm_medium`: Specifies the marketing medium (e.g., cpc, email, banner).
* `utm_campaign`: Tracks the campaign name or promotion (e.g., summer\_sale2023).

### More granular UTM parameters

For even deeper insights, use additional UTM parameters:

* `utm_term`: Tracks keywords for paid search campaigns.
* `utm_content`: Differentiates similar content or links within the same ad.

## Recommended UTM setup for Dema

We recommend using the below UTM parameters for search and social paid ads and campaigns:

### Google

```text theme={null}
utm_source=google&utm_medium=cpc&dema_id={campaignid}
```

### Meta

```text theme={null}
utm_source=meta&utm_medium=paid_social&dema_id={{campaign.id}}&dema_adid={{ad.id}}
```

### TikTok

```text theme={null}
utm_source=tiktok&utm_medium=paid_social&dema_id=__CAMPAIGN_ID__&dema_adsetid=__AID__&dema_adid=__CID__
```

### Snapchat

```text theme={null}
utm_source=snapchat&utm_medium=paid_social&dema_id={{campaign.id}}&dema_adsetid={{adSet.id}}&dema_adid={{ad.id}}
```

### Pinterest

```text theme={null}
utm_source=pinterest&utm_medium=paid_social&dema_id={campaignid}&dema_adsetid={adgroupid}&dema_adid={adid}
```

This structured UTM setup enables Dema to track specific campaign and ad IDs and connect them to traffic, spend, and creatives, providing deeper insights and better attribution.

<Info>
  Using IDs instead of names creates consistency, even if campaign names are updated later.
</Info>

<Warning>
  **Note**: Poorly structured UTM parameters can lead to incorrect attribution and messy reporting. Follow our guidelines to ensure your data stays clean and actionable.
</Warning>
