How attribution works (gclid and UTM)
See how Relator links each CRM sale to the lead and the campaign that brought it, and how to set up UTMs and gclid for it.
In this article · 6 sections
To calculate real ROAS, Relator needs to know which campaign each sale came from. It does this in two hops: it links the won deal to the lead in the CRM, and the lead to the campaign using the tags the lead carried on arrival (gclid, fbclid and UTMs). This article explains the rules and what to set up for high coverage.
Hop 1: from deal to lead
- HubSpot: the deal is linked to its associated primary contact. Without an association, Relator tries the email.
- RD Station CRM: the deal is linked to the RD Station Marketing lead with the same email.
Hop 2: from lead to campaign
1st
- Tag on the lead
gclid(Google Ads click)- How it matches
- Relator finds the click in Google Ads and takes the exact campaign name
- Precision
- Exact
2nd
- Tag on the lead
utm_campaign- How it matches
- Compared with the names of campaigns that had spend, ignoring case, spaces, hyphens and underscores
- Precision
- Approximate
—
- Tag on the lead
- Neither
- How it matches
- The deal goes to No attribution
- Precision
- —
| Order | Tag on the lead | How it matches | Precision |
|---|---|---|---|
| 1st | gclid (Google Ads click) | Relator finds the click in Google Ads and takes the exact campaign name | Exact |
| 2nd | utm_campaign | Compared with the names of campaigns that had spend, ignoring case, spaces, hyphens and underscores | Approximate |
| — | Neither | The deal goes to No attribution | — |
UTM matching example: the campaign “Black Friday Conversion” matches utm_campaign=black-friday-conversion, black_friday_conversion or BlackFridayConversion. Accents and other symbols count: “Conversão” doesn't match “conversao”, and an em dash (—) in the name isn't the same as a hyphen.
How the channel is decided
gclid- Channel
- Google Ads
fbclid- Channel
- Meta Ads
utm_source= google, google_ads, adwords or googleads- Channel
- Google Ads
utm_source= facebook, fb, instagram, ig or meta- Channel
- Meta Ads
Another
utm_sourceor onlyutm_campaign- Channel
- Other sources (UTM)
No tags
- Channel
- No source / No attribution
| The lead has... | Channel |
|---|---|
gclid | Google Ads |
fbclid | Meta Ads |
utm_source = google, google_ads, adwords or googleads | Google Ads |
utm_source = facebook, fb, instagram, ig or meta | Meta Ads |
Another utm_source or only utm_campaign | Other sources (UTM) |
| No tags | No source / No attribution |
Get tracking ready
- 1Step 1
Turn on Google Ads auto-tagging
With auto-tagging on, every click carries the
gclidin the URL. It's the most reliable match, because it doesn't depend on names. - 2Step 2
Standardize Meta Ads UTMs
In the ads' URL parameters, use
utm_source=facebook(orinstagram) and autm_campaignequal to the campaign name. Meta's dynamic parameter for the campaign name avoids typos. - 3Step 3
Make sure the form stores the tags in the CRM
The form or landing page must pass the gclid and UTMs to the HubSpot contact or to the RD Station Marketing lead. Otherwise the lead reaches the CRM “clean” and falls under No source.
- 4Step 4
Check the coverage
In CRM, look at the Leads by source card and the leads without a source item in Pending actions. In Contacts, scan for people marked Organic/direct. The smaller the no-source share, the more reliable real ROAS is.
Full example
- 1.Mariana clicks an ad from the “Black Friday Conversion” campaign on Google Ads. The URL reaches the site with
gclid=Cj0K.... - 2.She fills in the form; the contact is created in HubSpot with the gclid stored.
- 3.Ten days later, the salesperson closes an R$ 8,000.00 deal associated with her contact and marks it as won.
- 4.On the next sync, Relator links the deal to the contact, finds the click by its gclid and adds R$ 8,000.00 to the revenue of the “Black Friday Conversion” campaign and the Google Ads channel.
Common problems
- Lots of deals under No attribution → contacts reach the CRM without gclid or UTM. Check the form and the landing page's integration with the CRM.
- The lead has a UTM but the campaign gets no revenue → the
utm_campaigndoesn't match the name of the campaign that had spend. Compare letter by letter, accents included. - Won deal with no associated contact in HubSpot → associate the contact with the deal in HubSpot, or make sure the deal's email is the contact's email.
- RD Station CRM with everything lacking a source → connect RD Station Marketing and check that the contact's email in the CRM matches the lead's email in RD Station Marketing.
Frequently asked questions
Does the fbclid link the lead to a Meta campaign?
The fbclid sets the channel (Meta Ads), but the Meta campaign is identified by utm_campaign. Without utm_campaign, the lead counts toward Meta Ads and the deal shows with no campaign.
Which campaign gets a lead that clicked two ads?
The campaign from the tags stored on the lead. The gclid, when present, takes priority over the UTM.
Does Relator change the UTMs or my CRM?
No. It only reads what's in the CRM and the platforms.
Read next
- CRM and revenueReal ROAS: CRM revenue over spendUnderstand why real ROAS differs from the platform's ROAS, where to see it by channel and by campaign and what must be connected.
- CRM and revenueCRM contacts and companiesBrowse the contacts and companies synced from the CRM, with the source channel and campaign of each lead.
- ConnectionsConnect Google AdsSign in with your Google account, choose the Google Ads account (or the account inside an MCC) and start syncing.
- ConnectionsConnect Meta AdsAuthorize Relator on your Facebook account and choose the ad account that will feed your reports.