At Metric Theory, our goal is to maximize the results that matter for our clients. In ecommerce, this is relatively straightforward (LTV aside) as we can measure success based on an instantaneous purchase. For lead-gen advertisers, including most B2Bs and ecommerce retailers requiring a more considered consumer purchase, this often means that the initial lead we generate does not tell the full story. To measure the effectiveness of our marketing efforts and optimize to increase revenue, we need to trace the path those leads follow to purchase. AdWords recently took a major step towards simplifying this process by introducing the ability to integrate lead data from Salesforce.

Don’t judge channels just by traffic; the Salesforce integration allows for significantly more insight into your advertising. Image via Pexels.

Why Track Leads to Sales

We’ve written previously about the importance of back-end tracking, using it to close the loop between leads and sales, approaching back-end tracking with imperfect data, and other related topics. One thing that all these posts have in common is the need to connect data between disparate systems. In most cases, this means using Excel to marry up closed sales from a CRM system with cost data from ad publishers like AdWords. You can then feed the insights from this analysis back into your optimization decisions in AdWords, such as by amending your campaign CPA constraints to account for leads that don’t ultimately convert.

Taking the Next Step

Google’s new ability to integrate lead data from Salesforce directly into AdWords is a major step towards simplifying this process. This means that we can report on and optimize toward the keywords that actually generate sales directly in AdWords.


Google allows you to choose during the setup what events in your lead flow you want to bring into AdWords, as well as the standard options of whether to include those events in auto-optimization metrics.

This integration works through the following process:

  • When someone clicks one of your ads on Google, they will automatically have a parameter ‘gclid’ added to the end of the URL if you have autotagging enabled (note: autotagging is required for the integration to work)
  • You capture the value from the gclid together with lead data and pass it back to Salesforce
  • The lead status is then passed back to AdWords with this gclid value, enabling Google to connect it back to the keywords and ads the user clicked

Google has provided a thorough guide on how to configure this integration here. At a high level, it involves four parts:

  1. Modify your lead and opportunity elements in Salesforce to house a custom value called GCLID
  2. Modify the lead forms on your site to have a placeholder for the gclid
  3. Add some javascript code to take the gclid value and place it into the form field
  4. Connect your Salesforce and AdWords accounts to sync lead progress

Once You’re Set Up

The value of back-end tracking for a lead-gen campaign cannot be overstated. This data allows you to dramatically improve your efficiency by focusing your marketing spend on campaigns that drive closed deals. For example, you can adjust bids to spend more in states and countries where you get more closed sales, adjust your CPA targets for each campaign based on sales performance, and adjust your strategy to produce more qualified leads.

Before you begin optimizing, you will need to allow time for your data to aggregate. Depending on the length of your sales cycle, it may be several months before you begin to see the first sales come in. And once you do begin seeing sales arrive, make sure to accrue enough data so that you can identify trends with statistical significance. Optimizing based on too little data can lead to decisions that could hurt account performance down the line.

Also, keep in mind that Google will attribute your sales to the last ad the lead clicked before converting. This will usually value brand and remarketing ads (typically the final touchpoint before a conversion), over non-brand and display ads. Make sure to use an attribution tool that allows you to value the impact of your marketing investments on all levels of the purchase funnel.

Having the ability to close the loop from lead to sale all in one place significantly increases the utility of that detail and allows you to make faster and more actionable adjustments leading to better performance.