Ad spend and campaign matching
Roadway links ad spend to outcomes in two steps.
- Spend arrives from your ad platforms. You sync campaign cost by day into your warehouse through an ETL connector, or Roadway reads it through a direct connector. See Set up ad platforms.
- Visits are matched to campaigns. Roadway can compare any identifier in the landing page URL, such as
utm_campaign, a campaign or ad ID, or a platform's click ID, to the matching value from the ad platform. See How matching works.
With both in place, Roadway can report cost per sign-up, cost per customer, and return on ad spend by campaign.
Which pages to read
| Task | Page |
|---|---|
| Copy a tracking template for your ads | Tracking templates by platform |
| Google Ads | Google Ads |
| Meta Ads | Meta Ads |
| LinkedIn Ads | LinkedIn Ads |
| Reddit Ads | Reddit Ads |
| TikTok, Microsoft Ads (shown as Bing Ads in Roadway), X, Snapchat, ChatGPT Ads | Other ad platforms |
| Sync spend through Airbyte, Fivetran, Stitch, or Polytomic | Set up ad platforms |
| The spend table schema | Ad spend |
How matching works
Roadway reads each visit's landing page URL and compares an identifier in it to your ad platform data. The identifier can be:
- A UTM parameter, usually
utm_campaignset to the campaign ID or the exact campaign name. - A campaign, ad set or ad ID in any URL parameter, filled in by the platform's macros.
- A platform click ID, such as
gclidorfbclid, which the platform adds to the URL on each ad click.
Use the identifiers your ads already carry, and tell Roadway which ones they are. A visit matches when the identifier in its URL equals a value in your ad platform data.
Click IDs
| Platform | Click ID | When it's added |
|---|---|---|
| Google Ads | gclid |
When auto-tagging is on |
| Microsoft Ads | msclkid |
When auto-tagging of the Microsoft Click ID is on (the default) |
| Meta Ads | fbclid |
Automatically |
| LinkedIn Ads | li_fat_id |
When enhanced conversion tracking is on for your Insight Tag |
| TikTok Ads | ttclid |
Automatically |
| Snapchat Ads | ScCid |
Automatically |
| X Ads | twclid |
Automatically |
| Reddit Ads | rdt_cid |
Automatically |
Don't add click IDs to your templates yourself. Keep them in the URL: redirects, link shorteners and consent tools that drop the query string remove them. See Query parameters and SPAs.
Matching on utm_campaign
When you match on utm_campaign, Roadway looks for visits where:
campaign_nameequalsutm_campaign, or, if there's no match,campaign_idequalsutm_campaign.
Roadway matches by ID only when the visit's channel, assigned by your rules, equals the spend platform_name (for example Google Ads). If nothing matches, visits still appear under the channel your rules assign, with the raw utm_campaign value as the campaign, but no spend joins to it.
Prefer ID macros over names. Names change and often contain spaces and special characters that URL-encode differently in the platform and in your analytics.
Roadway's campaign_id is the platform's top-level campaign ID. For LinkedIn that's the top-level campaign, formerly called the campaign group, which {{CAMPAIGN_ID}} returns in LinkedIn's current naming.
What to set on every paid ad
| Parameter | Recommended value | Why |
|---|---|---|
utm_source |
Platform, such as google, linkedin, facebook |
Your Measurement rules use it to assign the traffic source and channel |
utm_medium |
cpc, paid_social, or your convention |
Distinguishes paid from organic |
utm_campaign |
The campaign ID, or the exact campaign name | Matches the visit to the spend row |
utm_content |
Ad or creative ID (optional) | Creative-level analysis |
utm_term |
Keyword, ad group or ad set (optional) | Keyword-level analysis |
Tracking templates by platform
Copy the template for each platform and paste it where shown. Each one fills in the platform's IDs with its own macros. The platform adds its click ID on top.
Google Ads
Paste into Tracking template in your account, campaign or ad group settings. See Google's ValueTrack parameters.
{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign={campaignid}&utm_content={creative}&utm_term={keyword}
Microsoft Ads
Paste into Tracking template at account, campaign or ad group level. See Microsoft's URL parameters.
{lpurl}?utm_source=bing&utm_medium=cpc&utm_campaign={CampaignId}&utm_content={AdId}&utm_term={keyword}
Meta Ads
Paste into URL parameters under the ad's destination. See Meta's URL parameters guide.
utm_source=facebook&utm_medium=paid_social&utm_campaign={{campaign.id}}&utm_content={{ad.id}}&utm_term={{adset.id}}
LinkedIn Ads
Paste into URL parameters at account or campaign level. Dynamic values only work at those two levels. See LinkedIn's URL tracking parameters.
utm_source=linkedin&utm_medium=paid_social&utm_campaign={{CAMPAIGN_ID}}&utm_content={{AD_ID}}&utm_term={{AD_SET_ID}}
TikTok Ads
Paste into the ad's URL parameters with the custom option. __AID__ is the ad group and __CID__ is the ad. See TikTok's URL parameters.
utm_source=tiktok&utm_medium=paid_social&utm_campaign=__CAMPAIGN_ID__&utm_content=__CID__&utm_term=__AID__
Snapchat Ads
Add in the ad's Build a URL parameter step. Keep the capital S in adSet. See Snapchat's URL macros.
utm_source=snapchat&utm_medium=paid_social&utm_campaign={{campaign.id}}&utm_content={{ad.id}}&utm_term={{adSet.id}}
Reddit Ads
The Ads Manager destination URL takes static values. Use the exact campaign name, and don't rename the campaign later.
https://example.com/landing?utm_source=reddit&utm_medium=paid_social&utm_campaign=spring-launch
Catalog ads and the Reddit Ads API (click_url_query_parameters) accept macros. See Reddit's URL parameters.
utm_source=reddit&utm_medium=paid_social&utm_campaign={{CAMPAIGN_ID}}&utm_content={{AD_ID}}&utm_term={{ADGROUP_ID}}
X Ads
X has no URL macros. Add static values to the website URL, using the exact campaign name.
https://example.com/landing?utm_source=x&utm_medium=paid_social&utm_campaign=spring-launch
ChatGPT Ads
Add static values to the destination URL, using the exact campaign name.
https://example.com/landing?utm_source=chatgpt&utm_medium=cpc&utm_campaign=spring-launch
Macro names are set by each platform and can change. Check the platform's documentation if a value shows up as literal text.
Verify
- Click a live ad, or use the platform's preview and open the final URL in a browser.
- Confirm the address bar shows real values, such as
utm_campaign=1234567890, not the macro text, and that the platform's click ID is there. - Check that your page views keep the full landing page URL. See Query parameters and single-page apps.
- In your warehouse, confirm the same IDs appear in your spend table.
Troubleshooting
| Symptom | Likely cause |
|---|---|
Literal {campaignid} in the URL |
The tracking template isn't applied, or the platform doesn't support the macro at that level |
| Visits appear but the campaign has no match | The value in the URL differs from the platform's by case or spacing, or is an ID of a different level |
| Click ID missing from the URL | Auto-tagging or enhanced conversion tracking is off, or a redirect drops it |
| Redirects strip parameters | A link shortener, a redirect, or a consent tool removes the query string. See Query parameters and SPAs |