Skip to content New SourceLoop MCP: chat with your attribution data in Claude, ChatGPT & Cursor
SourceLoop

How to Track Marketing Attribution in HubSpot (Step by Step)

Get first-touch source, last-touch source, UTMs, and the full journey on every HubSpot contact. A simple step-by-step setup that works on any HubSpot plan.

Track marketing attribution in HubSpot with SourceLoop
Table of contents
  1. What you'll see on each HubSpot contact
  2. What you need before you start
  3. Step 1: Install the SourceLoop tracking script
  4. Step 2: Connect HubSpot
  5. Step 3: Approve SourceLoop in HubSpot
  6. Step 4: Choose what to sync
  7. Step 5: Check the new HubSpot properties
  8. Step 6 (optional): Map to your own HubSpot fields
  9. Step 7: Test it

HubSpot is where your leads live. But ask it which campaign brought in a contact and you usually get one vague answer, like Paid Search or Direct Traffic.

That's not enough to decide where your budget should go. You need the first touch, the last touch, the exact UTMs, and the pages people read before they converted.

This guide shows you how to get all of that onto every HubSpot contact in about 10 minutes. It works on every HubSpot plan, including Free.

What you'll see on each HubSpot contact

  • First touch: the source, medium, and campaign that first brought them to your site.
  • Last touch: the source of the visit where they actually converted.
  • Landing pages: where they first arrived and where they converted.
  • Full journey: every session and page view before the conversion.

What you need before you start

  • A SourceLoop account (the 7-day trial works fine).
  • A HubSpot user with Super Admin or Account Access permission.
  • Admin or Owner role in SourceLoop.

Step 1: Install the SourceLoop tracking script

In SourceLoop, go to Setup, then Tracking code. Copy the script and paste it into the head of every page on your site.

SourceLoop Setup page showing the tracking code script ready to copy

Put it on every page, not just your forms. That's how SourceLoop sees the whole journey. Need help? See the install guide.

Step 2: Connect HubSpot

Click Setup in the left sidebar.

SourceLoop home page with Setup highlighted in the left sidebar

Open the CRM tab. You'll see cards for HubSpot, Salesforce, and Pipedrive.

SourceLoop Setup CRM tab with HubSpot, Salesforce, and Pipedrive cards

Click Connect on the HubSpot card. You'll be sent to HubSpot to approve the connection.

SourceLoop CRM drawer with the HubSpot Connect button highlighted

Step 3: Approve SourceLoop in HubSpot

  1. Sign in to HubSpot if you aren't already.
  2. Pick the HubSpot account you want to connect.
  3. Review the permissions and click Connect app.

You'll land back in SourceLoop. The HubSpot card now says Connected, with your portal ID. You won't need to reconnect, because SourceLoop refreshes the HubSpot token on its own.

Step 4: Choose what to sync

The HubSpot drawer opens with two options:

  • Inbound (HubSpot to SourceLoop): pulls your existing contacts, companies, and deals in, so your SourceLoop reports include real pipeline.
  • Outbound (SourceLoop to HubSpot): pushes source, UTMs, and journey data into HubSpot contact properties.

Turn on both, then click Save. The first sync takes anywhere from 30 seconds to about 30 minutes, depending on how many contacts you have. After that, SourceLoop syncs every 15 minutes.

Step 5: Check the new HubSpot properties

You don't need to create anything in HubSpot. SourceLoop creates these contact properties the first time it writes to them:

  • sourceloop_first_channel, sourceloop_first_source, sourceloop_first_medium, sourceloop_first_campaign
  • sourceloop_latest_channel, sourceloop_latest_source, sourceloop_latest_medium, sourceloop_latest_campaign
  • sourceloop_first_landing_page, sourceloop_latest_landing_page

Add them as columns in your contact view, or use them in lists, workflows, and reports like any other HubSpot property.

Step 6 (optional): Map to your own HubSpot fields

Already have UTM fields that power your workflows? Point SourceLoop at those instead.

Go to Setup, then CRM, then HubSpot. Scroll to Field mappings and click Edit next to Contacts.

SourceLoop HubSpot drawer showing sync toggles, stage mappings, and field mappings
  1. Click Add mapping.
  2. Pick the entity: Contact, Company, or Deal.
  3. Pick the SourceLoop field on the left, like first_campaign.
  4. Pick your HubSpot property on the right, like original_utm_campaign.
  5. Set the direction to Outbound and click Save.
Tip: map first-touch source to the Deal record too. Then HubSpot's revenue reports can group closed deals by the channel that started them.

Step 7: Test it

  1. Open your site in an incognito window with ?utm_source=test&utm_campaign=verify added to the URL.
  2. Fill in a form with a real email address.
  3. Wait one sync cycle, about 15 minutes.
  4. Open the contact in HubSpot. You should see test as the source and verify as the campaign.

In SourceLoop, the same contact shows its full journey in the Contacts Hub.

SourceLoop Contacts Hub showing a lead's full journey timeline

And the attribution dashboard rolls everything up by source, campaign, and landing page.

Start your free 7-day SourceLoop trial and see where your HubSpot contacts really come from. No card needed.

Frequently asked questions

  1. FAQ
  2. Do I need HubSpot Marketing Hub Professional?

    No. This works on every HubSpot plan, including Free and Starter.

  3. Will SourceLoop overwrite my existing HubSpot fields?

    Not by default. It writes to its own sourceloop_ properties and leaves everything else alone, unless you map a field to one of your own properties.

  4. Does it work for contacts I already have?

    Yes. The first sync pulls in existing contacts, matched by email, and adds attribution to their future visits and conversions.

  5. How often does data sync to HubSpot?

    Every 15 minutes, after the first full sync.

Share this post

Post on X Share on LinkedIn

Keep reading

All posts

Track every conversion to its true source

Capture and send full attribution data from every signup, lead, booking, and sale to your CRM and ad platforms, so you know exactly what's driving revenue.

Without SourceLoop

Untagged

Kayden Floyd

kayden@abc.com

  • SourceUnknown
  • MediumUnknown
  • CampaignUnknown
  • Landing pageUnknown
Journey
No touchpoints captured

With SourceLoop

Auto-tagged

Kayden Floyd

kayden@abc.com · Acme Co.

  • Channel Paid Social
  • CampaignFree_demo
  • Landing page/pricing
Journey
Synced to HubSpot Google Ads Meta