Tapper
Search docs...
⌘K
SupportDashboard

Add the Sales Cloud click ID field

Store the Google click ID (GCLID) on your Salesforce Sales Cloud leads so Tapper can match closed deals back to the ad clicks that produced them.


Tapper needs to know which ad click produced each lead. The most reliable way to answer that is the Google click ID: the gclid Google adds to your landing page URL when someone clicks an ad.

If your leads already store the click ID in a field Tapper recognizes, Tapper finds it when you connect and there is nothing to do. If they don't, this page sets it up: a field in Salesforce to hold the value, and a change to your lead form to capture it.

Many organizations already do this. Storing the click ID on the Lead is the standard way to import offline conversions into Google Ads. Check with whoever set up your Google Ads tracking before building it again.

Why it matters

A deal that matches no ad click never reaches Google, so bidding cannot learn from it. Tapper matches each outcome from your Salesforce click ID field, or from Tapper click data. Tapper does not turn on syncing for a connection with no click ID field.

The Match rate on the CRM tab shows the share of your outcomes matched to a specific ad click, and how many came from each source. That number is the ceiling on how much of your deal value can reach Google.

Step 1: Create the field in Salesforce

1
Open the lead object

Go to Setup > Object Manager > Lead > Fields & Relationships, then click New.

2
Choose text

Select Text as the data type and click Next.

3
Name it

Set Field Label to GCLID and Length to 255. The field name fills in as GCLID__c automatically.

Tapper also recognizes Google_Click_ID__c, GoogleClickId__c and GCLID_c__c, in any letter case. A field with any other name is not detected, so ask your account manager to point Tapper at it.

4
Set field-level security

This step is easy to miss, and nothing works without it.

Tick Visible for the profile your integration user has, commonly System Administrator. Leave Read-Only unticked so your lead form can write to it.

A field without visibility is invisible to the API. Tapper cannot see it and reports that no click ID field was found.

5
Add to page layouts

Optional, but useful: it lets your sales team see the value on the record.

6
Repeat for opportunity

Create the same field, with the same field name, on the Opportunity object. Tapper reads the field it finds on Lead from Opportunity too, so without it Tapper cannot read your opportunities.

Visible, not Read-Only. Visible makes the field exist for that profile. Read-Only is an extra restriction on top, and it blocks your lead form from writing the value.

Step 2: Capture the click ID on your form

Google appends ?gclid=... to your landing page URL on every ad click. Your form needs to read it and submit it into the new field.

1
Add a hidden field

Add a hidden input to your lead form that maps to the GCLID Salesforce field. In Web-to-Lead, name the input with the field's generated ID. In a form builder, map it to GCLID__c.

2
Populate it from the URL

Read gclid from the page URL and write it into the hidden field. Replace the input's name with the one your form expects.

<input type="hidden" id="gclid_field" name="GCLID__c" />
 
<script>
  const gclid = new URLSearchParams(window.location.search).get('gclid');
  if (gclid) {
    document.getElementById('gclid_field').value = gclid;
    sessionStorage.setItem('gclid', gclid);
  } else {
    const stored = sessionStorage.getItem('gclid');
    if (stored) document.getElementById('gclid_field').value = stored;
  }
</script>

The sessionStorage fallback matters. Visitors often land on one page and submit the form on another, and the gclid is only in the URL of the first.

3
Submit a test lead

Visit your landing page with ?gclid=test123 on the end, fill in the form, and confirm the value lands on the new Lead record in Salesforce.

Using a form builder such as HubSpot, Marketo, Pardot, Unbounce or Webflow? Most have a built-in way to capture URL parameters into hidden fields. Search their docs for "hidden field URL parameter" rather than writing the script above.

Step 3: Confirm it in Tapper

1
Connect again

Tapper looks for the field when you connect. If you created the field after connecting, ask your account manager to point Tapper at it. Or select Disconnect on the CRM tab, then connect again with Connect your Salesforce org. The new connection starts paused and runs a new 12-month import when you turn syncing on.

2
Check the detected field

Under Click ID field, the CRM tab shows the detected field name. If it still reads None found, revisit the field-level security step above.

3
Watch the match rate

As new leads come in carrying a click ID, the Match rate climbs. Only leads created after the form change have a value in the field.

To find the CRM tab, see Connect Salesforce Sales Cloud.

Also worth knowing

gbraid and wbraid

Google sends these instead of gclid on some iOS traffic. Tapper uploads the click ID field's value to Google as a gclid only, so keep gbraid and wbraid values out of this field.

Click IDs expire

Google matches an uploaded conversion only inside your conversion action's click-through conversion window, which is at most 90 days. For sales cycles longer than that, Tapper can upload a value at an earlier stage of the lead and a separate value when the deal closes. Each stage goes to its own conversion action. Ask your account manager to set that up.

The field is not retroactive

Leads that existed before the field did have no click ID in it and cannot acquire one. Expect the share matched from your Salesforce click ID field to start low and rise as new leads flow through.