Saving GCLID (Adwords click ID) to Salesforce is an essential part of Salesforce & Adwords integration. In this article, we’ll show you step-by-step how you can do this.

Step 1 – Make sure that Adwords adds GCLID to ad URLs

All you need to do is make sure that auto-tagging is enabled for your Adwords account. In case it’s not, you can do so using these steps:

  1. Sign in to your Google Ads account.
  2. In the left page menu, click Settings.
  3. Click Account settings along the top of the page.
  4. Click the Auto-tagging section.
  5. To enable auto-tagging, check the box next to “Tag the URL that people click through from my ad.”
  6. Click Save.

Step 2 – Create GCLID fields in Salesforce

Create 4 GCLID fields in Salesforce: for Lead, Opportunity, Account and Contact objects. Feel free to skip objects you’re not using.

Make sure to create Text fields with Length=255. They should look something like this:

Create GCLID field in Salesforce

Create GCLID field in Salesforce

Step 3 – Add GCLID hidden field to your forms

Add a hidden field to your forms that looks like this:

<input type=”hidden” id=”gclid”>

Make sure to connect this field with the Salesforce GCLID field you’ve just created.

Step 4 – Add a script that will populate the GCLID hidden field

This script will find a hidden field with id “gclid” and populate it with the actual value of gclid parameter:

It’s best to put it before the closing </body> tag.

Want to learn more about Salesforce & Adwords integration?

You can read our blog post to learn about our preffered method for connecting Salesforce & Adwords.

Also, feel free to contact us if you’d like us to help set up this integration for you.

Find out where your sales are really coming from

Enjoy your FREE 30-day trial, starting today

Connect my CRM and Google Analytics