Manually import Google Ads conversions from Salesforce
Google Ads offers a way to automatically import conversions from Salesforce. But if you don’t think that solution is right for your business, you can manually import conversions from Salesforce.
This article explains how to set up your Salesforce account and manually import conversions into Google Ads.
Before you begin
To use this feature, you’ll need to meet the following requirements:
- Be able to sign in to a Salesforce Sales Cloud® account.
- Have auto-tagging enabled in your Google Ads account(s).
- Be able to edit your website code. You or your webmaster will have to edit your code to capture the Google click ID (GCLID).
- Be able to make changes in your Salesforce® account, including creating custom fields and enabling field history tracking.
- Have a click-to-conversion cycle that is less than 90 days. Conversions uploaded more than 90 days after the associated last click will not be imported by Google Ads and will therefore not show up in your conversion statistics.
- Use Salesforce’s web-to-lead feature, or another solution to send leads to Salesforce.
How it works
No two businesses are alike, and there are endless ways you can define your lead and opportunity stages. But you'll only want to import some of those as Google Ads conversions.
We'll use one sample scenario below to show you how the integration works, and then give you some ways to customize that to your situation later in this article.
Here's the sample sales process:
- A prospective customer clicks on your ad, which leads to your website.
- The prospective customer explores your web pages — she reads descriptions, watches videos, and downloads whitepapers. During that session, or a later one, she enters her information into your lead submission form that uses Salesforce's Web-to-Lead solution.
- A lead is created in Salesforce.
- When the lead becomes "qualified," it's converted to an opportunity. Then, an opportunity record is created with the initial stage "prospecting."
- When the opportunity is won and closed, the opportunity stage is set to "Closed Won."
- Finally, you'd want to measure when a click leads to both a qualified lead and a final sale.
See the technical details for this process
Channel | Key event | Technical details |
---|---|---|
Online | A prospective customer clicks on your ad, which leads to your website. | Google passes the GCLID to the website. |
Online | The prospective customer explores your web pages — she reads descriptions, watches videos, and downloads whitepapers. During that session, or a later one, she enters her information into your lead submission form that uses Salesforce's Web-to-Lead solution. | Using the JavaScript code samples below, the website stores the GCLID in a cookie and then passes the GCLID value (along with the lead information entered on the form) to Salesforce.com. Note: If you'd like to track this lead submission as a conversion, you could use Google Ads conversion tracking to track conversions on a website. |
Offline | A lead is created in Salesforce. | Salesforce.com creates a new lead that stores the lead's information + GCLID |
Offline | When the lead becomes "qualified," it's converted to an opportunity. Then, an opportunity record is created with the initial stage "prospecting." | Salesforce stores this conversion event in the opportunity history so Google Ads can later retrieve exactly when the click resulted in a new opportunity (aka qualified lead) |
Offline | When the opportunity is won and closed, the opportunity stage is set to "Closed Won." | Salesforce stores this conversion event in the opportunity history so Google Ads can later retrieve exactly when the click resulted in a final sale, or "win." |
Set up
Below, we'll show you how a Sales Cloud administrator can do the following:
- Set up custom fields to store the GCLID and related information.
- Capture the Google Ads click ID ("GCLID").
- Modify your web-to-lead HTML form to pass the GCLID to each new lead record.
- Download the relevant data so you can upload your conversions into Google Ads.
Step 1: Configure your Salesforce account
- Create a custom field called "GCLID" (API name is GCLID__c) on the lead object as well as on the opportunity object. The field length is 255 characters. Make this field read-only, as this will be automatically populated.
- Create a custom text formula field called "Google Ads Action" on both the lead and opportunity object (the API name is Google Ads_Action__c). Enter the simple formula 'add'. This field will always contain the static value "add" and is used later to simplify the creation of the data file the admin feeds back into Google Ads.
- In the Lead Custom Field Mapping screen, map the lead field GCLID to the opportunity field GCLID. That way, the GCLID is transferred from the lead to the opportunity automatically when a lead is converted into an opportunity.
Step 2: Edit your website to save the click ID in a cookie
If a visitor clicks on your ad, Google Ads will append the URL parameter "gclid" to the URL that leads to your landing page.
You'll need to store this parameter's value in a cookie to retrieve it later when a prospective customer enters her data into the Web-to-Lead form.
If you embed the following JavaScript code immediately before the closing