TrustData
Connectors

Meta Ads

Connect Meta Ads (Facebook & Instagram) and configure tracking parameters.

Connect your Meta Ads account to sync Facebook and Instagram advertising data.

URL parameters setup

Do this first! Configure URL parameters in Meta Ads Manager before connecting in TrustData.

Setting up URL parameters

Add the following URL parameters to your ads:

trdt_cpid={{campaign.id}}&trdt_agid={{adset.id}}&trdt_ctid={{ad.id}}

You can set URL parameters at the account, campaign, or ad level. Here is how to bulk edit URL parameters at the ad level:

  1. In Meta Ads Manager, navigate to the Ads tab
  2. Select the ads you want to modify

  1. Click the Edit button in the toolbar
  2. From the dropdown menu, select URL parameters

  1. In the left sidebar, click URL parameters under Tracking
  2. Enter the tracking parameters in the URL parameters field for all selected ads or individually per ad
  3. Click Save as draft

  1. Click Review and publish to apply the changes to your ads

Available dynamic parameters

ParameterDescriptionExample Value
{{campaign.id}}Campaign ID23851234567890
{{campaign.name}}Campaign nameSummer_Sale_2024
{{adset.id}}Ad set ID23851234567891
{{adset.name}}Ad set nameUS_25-34_Interest
{{ad.id}}Ad ID23851234567892
{{ad.name}}Ad nameVideo_Creative_1
{{placement}}PlacementFacebook_Feed
{{site_source_name}}Platformfb, ig, an
Note: Meta's fbclid is automatically appended by Meta. TrustData captures both fbclid and your custom trdt_cid.

Verify your setup

  1. Preview an ad in Ads Manager
  2. Click on the ad preview
  3. Check the URL in your browser:

Expected URL:

https://example.com/landing?trdt_cpid=23851234567890&trdt_agid=23851234567891&trdt_ctid=23851234567892&fbclid=IwAR3...

Connecting in TrustData

After configuring URL parameters:

  1. Go to SettingsData Sources
  2. Click Add Data SourceMeta Ads
  3. Click Connect with Facebook
  4. Log in with your Facebook account
  5. Select the ad accounts you want to sync
  6. Click Done then Save

Required permissions

TrustData requests these permissions:

  • ads_read - Read ad account data
  • ads_management - Access campaign structure (read-only usage)

TrustData only reads data. We never modify your campaigns.

Business manager access

For Business Manager accounts:

  1. Ensure your Facebook user has Analyst or higher access
  2. The ad accounts must be claimed by the Business Manager
  3. Select the specific ad accounts during connection

Synced data

Data TypeDescription
CampaignsName, objective, status, budget
Ad SetsName, targeting, budget, schedule
AdsCreative, name, status
MetricsImpressions, reach, clicks, spend, CPM, CPC

Date range

  • Historical: Last 90 days on first sync
  • Ongoing: Daily incremental sync

Breakdown data

Metrics are synced with these breakdowns:

  • By day
  • By campaign/ad set/ad
  • By platform (Facebook, Instagram, Audience Network)

Attribution matching

TrustData matches Meta clicks to conversions:

User clicks ad → trdt_cid + fbclid captured
        ↓
User converts → conversion event sent
        ↓
TrustData matches via trdt_cid
        ↓
Attribution credit assigned to campaign/ad set/ad

View-through attribution

Meta reports view-through conversions (user saw ad but didn't click). TrustData focuses on click-through attribution for accuracy.

To compare with Meta's view-through data, check the Meta Ads dashboard.

Conversion forwarding

TrustData can forward server-side conversion events directly to the Meta Conversions API (CAPI). This improves match rates and gives Meta better optimization signals.

Getting a system user access token

For the most reliable setup, create a system user token in Meta Business Manager:

  1. Go to Meta Business SettingsUsersSystem Users
  2. Click Add to create a system user (or select an existing one)
  3. Set the role to Admin
  4. Click Generate New Token
  5. Select your app and grant the ads_management permission
  6. Copy the generated token
System user tokens don't expire. Unlike user tokens, they remain valid until manually revoked — ideal for server-to-server integrations.

Finding your Pixel ID

  1. Go to Meta Events Manager
  2. Select your pixel from the left sidebar
  3. The Pixel ID is displayed at the top of the page (a 15–16 digit number, e.g., 123456789012345)

Configuring in TrustData

  1. Go to SettingsAttribution IDs → select your ID → Edit Tracking Config
  2. Open the Forwarding tab
  3. Under Meta Conversions API:
    • Enable Meta CAPI
    • Enter your Pixel ID
    • Paste the system user Access Token
  4. Click Save Configuration

If you leave the access token empty, TrustData will attempt to use the OAuth token from your connected Meta Ads data source.

Troubleshooting

"No ad accounts found"

  1. Verify your Facebook account has access to ad accounts
  2. Check Business Manager permissions
  3. Try disconnecting and reconnecting

"Permission denied"

  1. Ensure you have Analyst access or higher
  2. Check that the ad account is active (not disabled)
  3. Verify Business Manager settings allow API access

"URL parameters not appearing"

  1. Check for conflicting URL parameters at different levels
  2. Campaign-level overrides account-level
  3. Ad-level overrides campaign-level

"fbclid not captured"

Meta automatically adds fbclid unless:

  1. You're using a link shortener (don't use them)
  2. Your site strips query parameters (check your redirects)
  3. The landing page has JavaScript errors

Instagram stories/reels

For swipe-up links in Stories:

  1. URL parameters work the same way
  2. Parameters are applied to the destination URL
  3. Verify with the preview tool