# Facebook UTM Parameters

> Complete guide to Facebook UTM parameters and tracking templates. Learn how to install, verify, and manage UTM parameters for accurate campaign attribution.

Configure Facebook UTM parameters for accurate campaign tracking and attribution in AnyTrack. Learn AnyTrack's recommended tracking template, installation process, and verification steps.

> ❗ ****
>
> 1. AnyTrack provides a recommended UTM tracking template with standard and dynamic parameters
> 2. The template integrates with 99% of marketing platforms
> 3. Use standard UTM parameters correctly to maximize actions, data, and ROAS

<Callout icon="🧭" theme="default">
  #- [Install AnyTrack Tag](/docs/install-anytrack-tag)
- [Ad Platforms Attribution](/docs/attribution-delays)
- [Event Mapping](/docs/event-mapping)

## Related Guides

  - <a href='/docs/facebook-ads'>Facebook Ads Setup</a> - Complete integration setup
  - <a href='/docs/facebook-ads#step-3-verify-your-ads'>Verify Ads Settings</a> - Verify UTM template installation
  - <a href='/docs/facebook-ads-troubleshooting'>Troubleshooting Guide</a> - Fix common UTM issues
  - <a href='/docs/advanced-options'>Advanced Options</a> - Advanced configuration
</Callout>

## List of Facebook UTM parameters

| **Parameter**      | **Token**              | **Example Value**     | **Info**                                                                   |
| ------------------ | ---------------------- | --------------------- | -------------------------------------------------------------------------- |
| `utm_source`       | `facebook`             | `facebook`            | Name of the traffic source                                                 |
| `utm_medium`       | `cpc`                  | `cpc`                 | Cost Per Click                                                             |
| `utm_content`      | `{{adset.name}}`       | `SpringSale_AdSet1`   | The name of the ad set in Facebook Ads.                                    |
| `utm_campaign`     | `{{campaign.name}}`    | `Spring_Sale_2026`    | The name of the campaign for attribution purposes.                         |
| `utm_term`         | `{{ad.name}}`          | `DiscountAd_VersionA` | Refers to the specific ad used in the campaign.                            |
| `utm_id`           | `{{campaign.id}}`      | `123456789`           | A unique identifier for the campaign.                                      |
| `ad_id`            | `{{ad.id}}`            | `987654321`           | A unique identifier for the specific ad.                                   |
| `adset_id`         | `{{adset.id}}`         | `111222333`           | A unique identifier for the ad set.                                        |
| `placement`        | `{{placement}}`        | `feed`                | Indicates where the ad appeared (e.g., feed, stories, right column, etc.). |
| `site_source_name` | `{{site_source_name}}` | `example.com`         | Identifies the name of the site source where the ad traffic originated.    |

Unlike <a href='/docs/google-ads'>Google Ads</a>, Facebook doesn't provide a global setting for default UTM parameters.

> 📘 **Good**
>
> Bulk update your ads with AnyTrack's recommended UTM tracking template through Facebook Ads Manager.

### URL Tracking Template

A URL tracking template is a set of URL parameters and tokens appended to your ad URLs. Facebook automatically substitutes tokens with actual variables like `campaign.id`, `adset.id`, `ad.id` at runtime.

Example: The Facebook Campaign ID token `{{campaign.id}}` becomes the actual campaign ID `1283912839123812938` at runtime.

Using tokens instead of hard-coding values saves time, prevents errors, and enables better campaign analysis.

**The Facebook UTM Parameter Tracking Template:**

```
`utm_source`=facebook&`utm_medium`=cpc&`utm_content`={{adset.name}}&`utm_campaign`={{campaign.name}}&`utm_term`={{ad.name}}&utm_id={{campaign.id}}&ad_id={{ad.id}}&adset_id={{adset.id}}&placement={{placement}}&site_source_name={{site_source_name}}
```

**Example:** The template carries `adset_id={{adset.id}}`. At runtime, `{{adset.id}}` becomes the actual ID `123123123123818`:

```
https://anytrack.io?adset_id=123123123123818
```

### Where should you place the Tracking template?

The tracking template should be added in the URL Parameters field.

<Image align="center" alt="Facebook Tracking Parameter field" border={true} caption="Facebook URL Parameters Field Settings" src={readmeAsset1} width="650px" />

### Why the URL Tracking Template Matters

The URL tracking template standardizes data collection across ads and campaigns. AnyTrack uses UTM parameters to build campaign reports and align Facebook Ads data with session data. Google Analytics uses UTM parameters for attribution reports.

**Benefits:**
- **Improved tracking and attribution:** Standardized parameters across campaigns
- **Cross-platform reporting:** Consistent data across AnyTrack, Google Analytics, and Facebook
- **Custom audience building:** Use campaign data for targeted audiences
- **Cross-network use:** Use parameters across multiple ad platforms

### Finding the Facebook URL Tracking Template

Access AnyTrack's prebuilt template in the Facebook Ads Integration tab:

**[Tracking Tags](https://dashboard.anytrack.io/asset-Tracking Tags)** → **Your Tracking Tag** → **Ads Integrations**

<Video align="center" border={true} src={readmeAsset2} className="border" />

### Customizing UTM Parameters

Yes. Keep ID-based parameters in the template but customize or replace name-based parameters as needed. AnyTrack leverages UTM parameters to match ad account data with session data.

**We recommend our tracking template** because it follows Google Analytics best practices and enables accurate campaign, ad set, and ad reporting.

### Compatibility with Other Tracking Software

Yes, the AnyTrack template is compatible with other tracking software. AnyTrack uses standard UTM parameters while most alternatives use custom parameters like `tw_id` or `h_adid`. Append custom parameters to the AnyTrack template without interference.

**Required Parameters:**
- `utm_source`
- `utm_medium`
- `utm_campaign`
- `utm_id`
- `adset_id`
- `ad_id`

> ❗ ****
>

## Verifying UTM Parameters in Your Ads

1. Go to **Tracking Tags** → click on the **Facebook Tracking Tag** you want to verify
2. Click the **Ads integration** tab
3. Click **VERIFY ADS SETTINGS**
4. AnyTrack highlights errors and suggests changes

<Image align="center" border={true} width="650px" src={readmeAsset3} className="border" />

> ⚠ ****
>
> While you can add parameters directly to the final URL, add them in the appropriate fields instead.

<br />

<HowToSchema
  name="Bulk Update Facebook Ads with the URL Tracking Template"
  description="Bulk update your Facebook Ads with AnyTrack's URL Tracking Template for accurate tracking and reporting."
  steps={[
    { name: "Open AnyTrack Dashboard", text: "Log in to your AnyTrack account." },
    { name: "Go to Tracking Tags", text: "Click Tracking Tags, select your Facebook Tracking Tag, and navigate to Ads Integration." },
    { name: "Copy the UTM Template", text: "Click the UTM Tracking Template to copy it." },
    { name: "Open Facebook Ads Manager", text: "Go to Facebook Ads Manager in your browser." },
    { name: "Navigate to Ads Tab", text: "Go to the Ads tab where your campaigns are listed." },
    { name: "Select Ads", text: "Select all ads you want to update." },
    { name: "Edit URL Parameters", text: "Click Edit and select URL Parameters." },
    { name: "Paste the Template", text: "Paste the UTM Tracking Template into the URL Parameters field." },
    { name: "Save or Publish", text: "Save as draft or publish the updated ads." },
  ]}
/>

## Bulk Update Facebook Ads with the URL Tracking Template

Bulk update your Facebook Ads with AnyTrack's URL Tracking Template for accurate tracking and reporting.

1. Open AnyTrack and go to **Tracking Tags**.
2. Select your **Facebook Tracking Tag** and open **Ads Integration**.
3. Copy the UTM Tracking Template.
4. Open Facebook Ads Manager and navigate to the Ads tab.
5. Select the ads you want to update.
6. Click **Edit** and select **URL Parameters**.
7. Paste the template into the URL Parameters field.
8. Save as draft or publish the updated ads.

<Image align="center" border={true} width="600px" src={readmeAsset4} className="border" />

## External References

- [Facebook URL dynamic parameters specifications](https://www.facebook.com/business/help/2360940870872492)
- [Google Analytics UTM best practices](https://support.google.com/analytics/answer/1037445)

<br />

<FaqAccordion
  title="Facebook UTM Parameters FAQ"
  icon="fa-duotone fa-circle-question"
  items={[
    {
      question: "Why is the URL tracking template important?",
      answer: "The URL tracking template standardizes data collection across ads and campaigns. It allows AnyTrack to align campaign data from Facebook Ads with visitor session data and helps Google Analytics build accurate attribution reports."
    },
    {
      question: "Where can I find the Facebook URL Tracking Template?",
      answer: "AnyTrack provides a prebuilt URL tracking template in the Facebook Ads Integration Tab under <a href='https://dashboard.anytrack.io/asset-Tracking Tags'>Tracking Tags</a> → your Tracking Tag → Ads Integrations."
    },
    {
      question: "Can I customize the UTM parameters in the tracking template?",
      answer: "Yes, you can customize the name-based UTM parameters as long as the ID-based parameters remain intact. The recommended template ensures compatibility with Google Analytics and AnyTrack's campaign reporting features."
    },
    {
      question: "How can I verify my ads' UTM parameters?",
      answer: "Go to <a href='https://dashboard.anytrack.io/asset-Tracking Tags'>Tracking Tags</a> → Select your Facebook Pixel → Ads Integration tab → Click 'VERIFY ADS SETTINGS.' AnyTrack will highlight errors and suggest changes."
    },
    {
      question: "Can I use AnyTrack's UTM parameters with other tracking software?",
      answer: "Yes, AnyTrack's UTM parameters are standard and compatible with most tracking software. Custom parameters from other software like <code>tw_id</code> or <code>h_adid</code> do not interfere with AnyTrack's parameters."
    },
    {
      question: "How do I bulk update Facebook Ads with the tracking template?",
      answer: "1. Copy the UTM Tracking Template from AnyTrack's dashboard.<br />2. Open Facebook Ads Manager, navigate to the Ads tab, and select all ads.<br />3. Hit 'Edit' and paste the template into the URL Parameters field.<br />4. Save your changes and publish the ads."

    },
    {
      question: "What are the required UTM parameters for AnyTrack?",
      answer: "The required parameters are: <code>utm_source</code>, <code>utm_medium</code>, <code>utm_campaign</code>, <code>utm_id</code>, <code>adset_id</code>, and <code>ad_id</code>. These ensure accurate tracking and reporting of campaigns, ad sets, and ads."
    }
  ]}
/>
