Skip to main content

Configuring URL Parameters for the Meta Integration

Follow these instructions to complete the Meta API integration.

Updated yesterday

Learn how to configure your Meta ad URLs so Lunio can accurately match Meta API integration data with MPLAT data.

Before you begin

If these are not complete, follow How to connect your Meta account to Lunio instructions first.

Why MPLAT setup is required

Lunio’s Meta integration enriches MPLAT data with Meta platform data.

To do this accurately, Lunio must capture the Meta campaign ID at click level using a supported URL parameter. Without this configuration:

  • Lunio cannot reliably match Meta data with MPLAT data.

  • Meta reporting in the dashboard will be incomplete or inaccurate.

  • Campaign-level reporting will not align correctly.

This configuration supports accurate Meta reporting and future reporting enhancements.

The following instructions follow the setup recommended by Meta. Please view their documentation on their page Specifications for URL dynamic parameters - https://www.facebook.com/business/help/2360940870872492

Passing Meta Campaign and Ad IDs

For Lunio to provide complete Meta campaign, ad set and ad-level reporting, your tracking URLs must include both:

  • The Meta campaign ID, and

  • The Meta ad ID

Each identifier serves a different purpose:

  • The campaign ID enables campaign-level reporting.

  • The ad ID allows Lunio to correctly associate each click with the specific ad and ad set it belongs to

Both are required to provide complete Meta reporting within the dashboard.

If either parameter is missing, reporting will be incomplete.

Passing the Meta Campaign ID

Lunio supports the following parameters for passing the Meta campaign ID:

1. Lunio-specific parameter

ppcp_campaign={{campaign.id}}

2. campaign_id

campaign_id={{campaign.id}}

3. utm_id

utm_id={{campaign.id}}

4. utm_campaign

utm_campaign={{campaign.id}}

Campaign ID Parameter Priority Order

If more than one supported parameter is present, Lunio will use them in the following order:

  1. ppcp_campaign

  2. Campaign_id

  3. utm_id

  4. utm_campaign

If ppcp_campaign is present, it will override all other campaign ID parameters.

If ppcp_campaign is not present but campaign_id is, campaign_id will be used, etc.

Passing the Meta Ad Set ID

The Meta Ad Set ID is required to required to enable ad and ad set-level reporting

You can include the Meta dynamic ad ID in your tracking parameters by adding the following parameter:

adset_id={{adset.id}}

This parameter should be added via the URL Parameters field under Tracking (recommended), or appended directly to the Website URL.

Example:

Passing the Meta Ad ID

The Meta Ad ID is required to required to enable ad and ad set-level reporting

You can include the Meta dynamic ad ID in your tracking parameters by adding the following parameter:

ad_id={{ad.id}}

This parameter should be added via the URL Parameters field under Tracking (recommended), or appended directly to the Website URL.

Example:

Passing the Placement & Site Source Name

The Placement & Site Source Name is required to collect placement and source site information.

You can include the these by adding the following parameters:

placement={{placement}}

site_source_name={{site_source_name}}

Important notes

  • If multiple supported campaign ID parameters are present, Lunio will use the parameter checked first in the hierarchy (see priority order)

  • The ad ID parameter is evaluated independently from the campaign ID parameter.

  • Passing the ad ID does not replace the requirement to pass a supported campaign ID parameter.

  • Both parameters are required for full campaign, ad set and ad-level reporting.

  • Please note, the values in the examples (e.g., {{campaign.id}}) are placeholders for the real macros that will be supplied by Meta

How to Add URL Parameters in Meta Ads Manager

URL parameters are configured at the Ad level.

Step 1: Navigate to your ads

  1. Open Meta Ads Manager

  2. Go to the Campaign

  3. Click into the Ads tab

  1. Select your ad(s)

  2. Click Edit

Step 2: Add the parameter

  • Scroll to the Tracking section

  • Click "Build a URL parameter" hyperlink

  • Click "Add parameter" button

  • Add the first parameter (e.g. ppcp_campaign) and link to the relevant value (e.g., ppcp_campaign = {{campaign.id}}

  • Click the "Add Parameter" button and add all the remaining parameter names and their corresponding values

  • When finished, click the "Apply" button

Using the URL Parameters field

Example: setting the {{campaign.id}} using the URL parameters field in the Tracking section.

ppcp_campaign={{campaign.id}}

or

campaign_id={{campaign.id}}

Meta will automatically replace {{campaign.id}} with the correct campaign ID.

Bulk Editing Ads

If you have multiple ads, Meta Ads Manager allows bulk editing to apply parameters across them all at the same time. This works in a similar way to editing individual ads, except changes will be applied in bulk.

  • On the Meta Campaigns Manager, check the ads you want to update the URL parameters

  • Click the edit button with the pencil icon

  • Scroll down to the tracking section

  • Click "Build a URL parameter" hyperlink

  • Click "Add parameter" button

  • Add the first parameter (e.g. ppcp_campaign) and link to the relevant value (e.g., ppcp_campaign = {{campaign.id}} )

  • Click the "Add Parameter" button and add all the remaining parameter names and their corresponding values

  • When finished, click the "Apply" button

Important Notes

  • Both the Meta campaign ID and Meta ad ID must be present in your tracking URLs to enable complete Meta reporting in Lunio.

  • If only the campaign ID is present, reporting will be limited to campaign level.

  • We recommend configuring parameters using Meta’s dedicated URL Parameters field rather than manually editing the Website URL.

  • If you are unsure how to configure these parameters, contact your Customer Success Manager.

Did this answer your question?