Set up Meta Ads link parameters
Add one line to your Meta ads so each click arrives with its campaign. This step is optional: the tracker works without it.
You need: access to your ads in Meta Ads Manager, and the SourceTrack tracking code on the pages your ads link to.
What this adds, and what happens without it
The tracker records every visit and any click ID or UTM parameter on the landing page, so installing the script is enough to count visits. The line below adds the campaign's ID number to each ad click. SourceTrack matches a campaign's ad spend to its clicks by that ID (or by a campaign name that matches), so without it, campaign-level reports cannot be tied to the spend of that campaign.
It covers the campaign only. It does not carry the ad set, the ad or the placement.
Copy the parameters
Copy this text exactly. Meta fills in the value in double braces when someone clicks your ad, so leave it as it is.
utm_source=facebook&utm_medium=paid_social&utm_campaign={{campaign.id}}&utm_id={{campaign.id}}You can also copy it in SourceTrack, on Setup & Health under Add URL parameters to your ad links, then choose Meta.
Add them to your ads
- In Meta Ads Manager, open the ad you want to track and go to its Tracking section at the ad level.
- Paste the text into the URL parameters field. Paste the parameters only, without a leading
?. - Publish the change. Repeat for each ad, or for each ad you duplicate from now on.
Meta can rename menus. If a screen looks different, use Meta's own page, Add URL Parameters to Your Meta Ads.
Check That It Works
- Open your site with a test link, for example
https://yourdomain.com/?sourcetrack_debug=1&utm_source=facebook&utm_medium=paid_social&utm_campaign=123&utm_id=123. A small panel shows the parameters and click IDs the tracker captured. - For a real check, click one of your live ads. In SourceTrack, open the Live Events Feed on Setup & Health.
- Find the visit. It should show the source
facebookand the campaign ID.
Not seeing data? See Troubleshooting.
Common Problems
- Campaigns show a number instead of a name: the parameters send each campaign as its ID number, so some reports show that number until you save a name for it.
- ROAS and cost figures are empty: they show only when SourceTrack has ad cost data for the dates you picked.
- Only some ads show a campaign: the parameters are set per ad. An ad created before you added them, or without them, arrives without the campaign ID.
- No conversions in Meta: this setup tracks clicks in SourceTrack. It does not send conversions to Meta, which is a separate setup.