Setting up a Salesforce integration allows you to measure your offline conversion events (that are post-lead) to import them directly into Google Ads. This will enable you to measure, report and optimize offline events, and schedule automated imports. It supports either user-provided data (such as email) or GCLID join keys, to enable enhanced conversions for leads and offline conversions import conversion solutions.
On this page
How to set up for enhanced conversions for leads
Before you begin
- Have a Salesforce credential that meets the minimum permissions requirements in your Salesforce account.
- Be able to make changes in your Salesforce account, including enabling API and enabling field history tracking.
- Configure Google tag and use Google Tag Manager to appropriately capture website conversions and leads.
- Make sure that there is first-party customer data available (email and/or phone number) on your website lead form.
- Ensure that you’ve reviewed and confirmed that you can comply with the customer data policies in Google Ads.
- Before setting up enhanced conversions for leads, you’ll need to identify your website lead forms and pick a field from the form that uniquely identifies your leads. At least one of the following variables must be provided when you configure enhanced conversions for leads on your website and when you later import the conversions:
- Email (preferred)
- Remove leading or trailing whitespaces.
- Convert the text to lowercase.
- Remove all periods (.) that precede the domain name in.
- A phone number
- Format phone numbers according to the E164 standard.
- We recommend using the lead's email address because it’s a highly unique identifier and isn’t prone to being reformatted in your CRM. If you're using a phone number, the tag will remove symbols and dashes, but the number must contain a country code.
How to set up for offline conversions import
Before you begin
- Have a Salesforce credential that meets the minimum permissions requirements in your Salesforce account.
- Be able to sign in to a Salesforce Sales Cloud account, using a login with appropriate permissions. For the easiest setup, consider using an account with System Administrator permissions, assuming your default access settings haven't been changed.
- Have auto-tagging enabled in your Google Ads account.
- Be able to edit your website code. You or your web developer 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 won’t 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 transmit lead information from your website to Salesforce.
Instructions
Follow the steps below to prepare your Salesforce account, Google Ads account, and website. Link your Salesforce and Google Ads accounts and start importing conversions.
Every business is different. The following are basic instructions, but you may want to customize your setup based on how you use Salesforce. If someone else manages your Salesforce account, work with them to find the best solution for you.
Before getting started, you’ll want to make sure your Salesforce account is set up in the following way. If someone else manages the Salesforce account for your business, they can help you with this step.
- Update the Opportunity object with the following changes:
- Create a custom field with the Field Name "GCLID" (in all capital letters, without the quotes). The “Field Label” can be anything you want. Set the field length to 255 characters. Make this field read-only so your users don't accidentally alter it.
- Enable field history tracking for the "Stage" field.
- Update your Lead object with the following changes:
- Create a custom field with the Field Name"GCLID" (in all capital letters, without the quotes). The “Field Label” can be anything you want. Set the field length to 255 characters. Make this field read-only so your users don't accidentally alter it.
- Enable field history tracking for the "Lead status" field.
- Map your new Lead.GCLID field to the new Opportunity.GCLID field.
Step 2: Adjust your Salesforce web-to-lead form
To store the GCLID with your lead's information, you’ll need to modify your web-to-lead submission form(s) so all new leads will include the GCLID value. You may need help from a web developer and Salesforce admin to complete this step.
The following explains how to add the GCLID field to your existing web-to-lead forms.
- Generate a standard web-to-lead form and include all fields you want your prospects to submit. Also include the lead field "GCLID" as a 'hidden' field. Your Salesforce admin or web developer will know how to make this change.
- Your web developer will need to note the new GCLID input field's ID, as this is needed for the next step where they implement the JavaScript on your site.
- Your web developer will then take this new form HTML code and update your existing forms. This means that your forms will now pass the GCLID value along with the lead's information into Sales Cloud.
Salesforce and your web pages are now ready to gather all the data. In the next step, your web developer will update your site so the GCLID value is automatically passed to the new GCLID form field
Keep in mind: your web-to-lead form needs to be located in the same domain as the rest of your web pages, so the JavaScript can properly transfer the GCLID value to the form.
Note: Other lead submission methods
If the lead info from your web form passes through another system before reaching Salesforce, make sure that any intermediate lead processing systems pass the GCLID through so that the GCLID value ultimately reaches your Salesforce account. The system you use should have a way to do this. If you’re not sure how, contact support for the 3rd-party solution you use.
Step 3: Edit your website to collect and save the click ID
When a visitor clicks on your ad, Google Ads will append a "gclid" URL parameter to the URL that leads to your landing page.
Your site will need to capture and store this parameter's value so it can retrieve it later when a prospective customer enters data into the lead form. If you have a web developer, they can help you edit your website code to do this.
We recommend you accomplish this by modifying and embedding the following JavaScript code. Before you embed the code, be sure to update the 'var gclidFormFields' line to include the field IDs of the new fields you added in the previous step. This is how the JavaScript knows which field or fields should contain the GCLID value. When this modification is complete, you should embed this code immediately before the closing