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.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:1
Open the ad in Ads Manager
In Meta Ads Manager, navigate to the specific ad you want to modify.
2
Find URL Parameters
Scroll down to the URL Parameters section within the ad settings.
3
Open the URL Parameter builder
Click Build a URL Parameter to open the parameter builder tool.
4
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.5
Save your changes
Save the ad. From this point on, every landing page URL generated by that ad will include
?campaign_id=12345 (with the actual campaign ID populated dynamically).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.