This article reviews the steps to follow to set up a legacy integration with Salesforce. 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: We've included basic instructions here, 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. Note that you should 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).
Before you begin
To use this feature, you’ll need to meet the following requirements:
- 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 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 transmit lead information from your website to Salesforce.
Instructions
Step 1: Configure your Salesforce account
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, he or she 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(s) should contain the GCLID value. Once this modification is done, you should embed this code immediately before the closing