campaign_id. These let the pixel link the session back to the exact campaign that generated it. Without these parameters, attribution becomes partial or inaccurate, which limits the pixel’s ability to detect fraud and identify overcharges tied to specific campaigns.
Required parameters
Include the following parameters in every ad destination URL. The more complete your tagging, the more precise your auditing and attribution data will be.| Parameter | Purpose | Example value |
|---|---|---|
campaign_id | Most important. The unique ID assigned by the ad platform. Enables exact campaign matching. | 123456789 |
utm_source | Identifies the traffic source | facebook, google, linkedin |
utm_medium | Describes how traffic was delivered | cpc, social, email |
utm_campaign | Campaign name for contextual reporting | black_friday_sale |
utm_content | Differentiates ad creatives within a campaign | video1, headlineA, carousel_ad1 |
utm_term | (Optional) Tracks keywords for search campaigns | running+shoes |
Example of a well-tagged URL
The URL below includes all required parameters and demonstrates the correct format:How to add campaign_id in Meta Ads
Meta supports dynamic URL parameters that automatically insert the campaign ID into your destination URL at the time your ad serves. Follow these steps to enable it:Add the campaign_id dynamic parameter
Choose
campaign_id from the list of available dynamic parameters. Meta will automatically insert the correct campaign ID value when the ad delivers.Platform URL templates
Use these templates as starting points when building tagged URLs for your campaigns.- Facebook Ads
- Google Ads
Add this as a URL parameter template in your Meta ad settings. Meta will populate Or as a complete destination URL:
campaign_id dynamically at ad delivery time.Best practices
Always include campaign_id
Always include campaign_id
Platform-assigned campaign IDs are globally unique and auto-assigned. They are the most reliable way for the Ad Pay Protection pixel to perform exact campaign matching. Make
campaign_id a standard part of every ad URL template you use.Use consistent UTM parameters
Use consistent UTM parameters
Inconsistent naming (e.g.,
Facebook vs. facebook vs. fb) fragments your data and makes reporting less reliable. Establish naming conventions for utm_source, utm_medium, and utm_campaign and apply them uniformly across all campaigns.Use auto-tagging and dynamic parameters
Use auto-tagging and dynamic parameters
Leverage platform-native dynamic parameter tools (like Meta’s URL Parameter builder or Google’s ValueTrack parameters) wherever possible. These automatically populate the correct values and eliminate manual errors.
Double-check final URLs before launching
Double-check final URLs before launching
Before activating any campaign, click through your ad’s destination URL and inspect the full URL in your browser’s address bar. Confirm that all parameters — especially
campaign_id — are present and correctly formatted.