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

How to Track Google Ads Leads in Salesforce

Connect Salesforce to Google Ads so each lead keeps its click ID and deal values flow back to Google as conversions. Full setup, step by step.

Google Ads leads flowing into Salesforce and back to Google as conversions
Table of contents
  1. Why Google Ads can't see what happens in Salesforce
  2. What you need before you start
  3. How to track Google Ads leads in Salesforce
  4. Step 1: Install the SourceLoop tracking script
  5. Step 2: Connect Salesforce
  6. Step 3: Put the source data on the Lead
  7. Step 4: Keep the data when a Lead converts
  8. Step 5: Connect Google Ads and create a conversion action
  9. Step 6: Tell SourceLoop what to send to Google
  10. Step 7: Check that it works
  11. How long does a Google click ID last?

Someone clicks your Google ad, fills in a form, and lands in Salesforce as a new Lead. Weeks later, a rep closes the deal. Google never hears about it.

This guide fixes that. You will save the Google click ID for every lead and send leads and deal values back to Google Ads, so your bids start following the customers who actually pay.

Why Google Ads can't see what happens in Salesforce

Google Ads counts a form fill on its own. It has no view into Salesforce, so a spam lead and a $40,000 deal look the same to your campaign. Three things get in the way:

  • The click ID (GCLID) sits in the URL for one visit. If nobody saves it, it's gone before a rep makes the first call.
  • Salesforce's LeadSource field holds a single value. It can't tell you the campaign or the pages the person viewed.
  • When a Lead converts to a Contact, custom fields can get left behind.

The fix has three parts. Save the click ID when the visitor lands. Put the source data on the Salesforce record. Send the lead and its value to Google.

What you need before you start

  • A Google Ads account with auto-tagging turned on.
  • A SourceLoop workspace, and the Admin or Owner role.
  • A Salesforce user with the System Administrator profile, or with Modify All Data and API Enabled.
  • A Salesforce sandbox, if you have one. It's the safest place to try the mapping first.

How to track Google Ads leads in Salesforce

There are seven steps. Steps 1 to 4 get clean data into Salesforce. Steps 5 to 7 send it to Google.

Step 1: Install the SourceLoop tracking script

In SourceLoop, open Setup, then Tracking code, and copy the snippet. Paste it into the head of every page on your site. From then on, SourceLoop saves the GCLID, the UTMs and the pages each visitor looks at.

SourceLoop Setup page showing the tracking code snippet to copy
The tracking code lives under Setup.

Check that it works with the verify tracking guide. If click IDs are new to you, read click IDs explained.

Step 2: Connect Salesforce

Click Setup in the left sidebar, then open the CRM tab and scroll to the Salesforce card.

SourceLoop home page with the Setup entry highlighted in the left sidebar
Setup is in the left sidebar.
  1. Turn on the Sandbox toggle if you want to test first. Leave it off for production.
  2. Click Connect. Salesforce asks you to sign in.
  3. Pick the org, read the permissions SourceLoop asks for, and click Allow.
  4. You land back in SourceLoop, and the card now says Connected.
SourceLoop Salesforce connect drawer with the sandbox toggle and Connect button
The sandbox toggle sits next to the Connect button.

Then turn on Inbound and Outbound sync and save. Inbound pulls your Leads, Contacts, Accounts and Opportunities into SourceLoop. Outbound writes source data into Salesforce. A small org syncs in under 5 minutes, and after that changes sync every 15 minutes.

Connect the sandbox first. You can fix a mapping there without touching a real lead.

The full walkthrough is in the connect Salesforce guide.

Step 3: Put the source data on the Lead

SourceLoop writes to its own custom fields on Lead and Contact. It creates them the first time it syncs, so you don't need to build anything in Salesforce.

SourceLoop fieldSalesforce field
first_sourcesourceloop_first_source__c
first_campaignsourceloop_first_campaign__c
first_landing_pagesourceloop_first_landing_page__c
latest_sourcesourceloop_latest_source__c
latest_campaignsourceloop_latest_campaign__c
lead_status_rawStatus (the standard Lead Status field)

First touch shows how the person first found you. Latest shows the visit that made them convert.

What about the standard LeadSource field? You have two choices.

  • Leave it alone. Your old reports keep working, and the new fields sit next to it.
  • Map first source to it. This helps if most of your reports use LeadSource. SourceLoop will overwrite what is there, even values typed by hand.

Most teams start with the first choice. The details are in push UTMs to Salesforce.

Step 4: Keep the data when a Lead converts

This is the step people miss. Salesforce only copies a custom Lead field to the Contact if you map it. Skip it, and the source data stays on the Lead while the Contact comes out empty.

  1. In Salesforce, go to Setup, then Object Manager, then Lead.
  2. Open Fields & Relationships and click Map Lead Fields.
  3. Map each sourceloop field to the field with the same name on Contact.
  4. Save.

This only helps future conversions. Contacts you already converted won't get the data back. This lead conversion mapping guide explains the rule well.

Step 5: Connect Google Ads and create a conversion action

In SourceLoop, open Setup, then Ad Platforms, then Google Ads, and connect your account. The connect Google Ads guide covers it. Then make the conversion action in Google Ads:

  1. Go to Tools, then Conversions, then New conversion action.
  2. Choose Import, then Other data sources, then Track conversions from clicks.
  3. Give it a clear name, like SourceLoop Salesforce Deal.
  4. Save it, open it, and copy the number at the end of the URL. That is your Conversion Action ID.

Step 6: Tell SourceLoop what to send to Google

Open the Google Ads drawer in SourceLoop and click Add conversion mapping. Most Salesforce teams make two.

MappingTrigger event typeValueWhat Google learns
New leadConversion createdOffA new lead came from this click
Deal valueExpected revenue updatedquote_valueHow big the deal is
SourceLoop conversion sync settings used to map events to a Google Ads conversion action
Each mapping sends one kind of event to one conversion action.

For the deal value mapping, add an inbound mapping on the Salesforce Field Mapping tab. Pull Opportunity Amount into SourceLoop as the quote value. When a rep changes the amount, SourceLoop sends the new number to Google.

A few other settings to know:

  • Attribution model. Last touch credits the visit that converted. First touch credits the first visit.
  • Include value. Turn it on for the deal value mapping.
  • Dedup window. Leave it at 1440 minutes, which is 24 hours.

If you want Google to bid on deals, make the deal value action your primary goal. Then untick Include in Conversions for the new lead action in Google Ads. It still shows in reports but stops steering bids. Every field is listed in the Google Ads conversions guide.

Step 7: Check that it works

  1. Wait one sync cycle, about 15 minutes. Open a new Lead in Salesforce and look at the sourceloop fields.
  2. Compare them with the same person in SourceLoop's Contacts Hub. The values should match.
  3. Open Setup, Ad Platforms, Google Ads, then Sync log. Each push lists the GCLID, value and Google's reply.
  4. After 6 to 24 hours, check Tools, then Conversions in Google Ads.
SourceLoop Contacts Hub showing a lead with the visitor journey and source details
The lead and its journey in Contacts Hub.

A new conversion action may say Pending verification at first. That is normal. It turns Active after Google has seen a few real conversions.

How long does a Google click ID last?

Google keeps a GCLID for only 90 days after the click. A conversion sent after that can't be matched to the ad.

If your deals take longer than that, don't wait for Closed Won. Send the new lead event right away, and send the deal value as soon as a rep sets it. Google's offline import FAQ explains the limits.

Running Google Ads and Salesforce together? Try SourceLoop free or book a demo and we'll help you set it up.

Frequently asked questions

  1. Do I need to create custom fields in Salesforce first?

    No. SourceLoop creates its sourceloop fields on Lead and Contact the first time it syncs. The connecting user needs permission to create custom fields. If you would rather use fields you already have, add a mapping on the Field Mapping tab.

  2. Will this overwrite my LeadSource field?

    Only if you map first source to LeadSource yourself. By default SourceLoop writes to its own fields and leaves LeadSource alone.

  3. What happens to the data when a Lead converts to a Contact?

    It carries over only if you map the sourceloop fields in Salesforce under Map Lead Fields. Do that once and every future conversion keeps its source data.

  4. Can I test this without touching real leads?

    Yes. Turn on the Sandbox toggle when you connect, and SourceLoop uses your sandbox org. Sandbox and production can be connected at the same time.

  5. How long does it take for a conversion to show up in Google Ads?

    SourceLoop sends matching conversions every 2 minutes. Google Ads can then take 6 to 24 hours to show them.

  6. Which Salesforce editions work?

    Sales Cloud and Service Cloud, in any edition. SourceLoop uses the standard Lead, Contact, Account and Opportunity objects, and Lightning or Classic makes no difference.

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