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.

Updated on October 7, 20264 min read
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
    —
OrderTag on the leadHow it matchesPrecision
1stgclid (Google Ads click)Relator finds the click in Google Ads and takes the exact campaign nameExact
2ndutm_campaignCompared with the names of campaigns that had spend, ignoring case, spaces, hyphens and underscoresApproximate
—NeitherThe 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_source or only utm_campaign

    Channel
    Other sources (UTM)
  • No tags

    Channel
    No source / No attribution
The lead has...Channel
gclidGoogle Ads
fbclidMeta Ads
utm_source = google, google_ads, adwords or googleadsGoogle Ads
utm_source = facebook, fb, instagram, ig or metaMeta Ads
Another utm_source or only utm_campaignOther sources (UTM)
No tagsNo source / No attribution

Get tracking ready

  1. 1
    Step 1

    Turn on Google Ads auto-tagging

    With auto-tagging on, every click carries the gclid in the URL. It's the most reliable match, because it doesn't depend on names.

  2. 2
    Step 2

    Standardize Meta Ads UTMs

    In the ads' URL parameters, use utm_source=facebook (or instagram) and a utm_campaign equal to the campaign name. Meta's dynamic parameter for the campaign name avoids typos.

  3. 3
    Step 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.

  4. 4
    Step 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. 1.Mariana clicks an ad from the “Black Friday Conversion” campaign on Google Ads. The URL reaches the site with gclid=Cj0K....
  2. 2.She fills in the form; the contact is created in HubSpot with the gclid stored.
  3. 3.Ten days later, the salesperson closes an R$ 8,000.00 deal associated with her contact and marks it as won.
  4. 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_campaign doesn'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

Chat

Didn't find it? Talk to us.

The chat is in the corner of the screen on this site and, inside the app, in your profile photo menu.

Emailsuporte@relator.digital

For account and data questions. Privacy and deletion requests go to privacidade@relator.digital.