Google Ads Attribution

Part 4: Passing conversion events back to Google Ads


Passing conversion events back to Google Ads

At the end of Part 3 we created a Lead in Salesforce together with valuable marketing information like the campaign details and the website pages visited. The Sales team nurture the Lead and - hopefully - the Lead converts to a Customer. At this point we want to send the conversion event back to Google so Google Ads can use this information for Ad optimsation. Implementing this event reporting is what we'll cover here.


Creating a Linked Account in Google Ads

We want a way to make a link between Salesforce and Google that we can use to signal conversions. Helpfully, Google Ads has a 'Product Linking' capability that will allow us to do this without involving any third party solutions.

There are 3 steps:

  1. Enable Field History tracking in Salesforce
  2. Add Salesforce as a Linked Account in Google Ads
  3. Setup the Conversion Actions in Google Ads

A. Enable Field History tracking in Salesforce

Field history tracking does as it's name suggests: it configures Salesforce to keep a history of the different values of selected fields in objects like Lead and Opportunity. The reason this is necessary is that Google Ads polls Salesforce on a regular basis to look for changes in Lead and Opportunity status. It uses the history records to check for status changes.

We want to track the history of the Lead Status in the Lead object and the Stage in the Opportunity object.

Setting this up is easy. Go to Salesforce Setup -> Object Manager and select the Lead object. Click on 'Fields & Relationships' then click on the 'Set History Tracking' button:

Then click on 'Enable Lead History' and select 'Lead Status' and click 'Save':

It's the same process for the Opportunity object except we select the 'Stage' field:

The final step we need to take in Salesforce is to map the gclid field in the Lead object to the gclid field in the Opportunity object. This passes the gclid value from Lead to Opportunity when a Lead is converted to an Opportunity. Go to Salesforce Setup -> Object Manager and select the Lead object. Click on 'Fields & Relationships' then click on the 'Map Lead Fields' button:

Click 'Opportunity' at the top then find the 'Gclid' row and set the mapping to 'gclid' (and don't worrry about the mixed capitalisation):


B. Add Salesforce as a Linked Account in Google Ads

Next we want to add Salesforce as a Linked Account. Start by selecting 'Linked Accounts' in the 'Tools and settings' menu:

You'll see quite a few options. Scroll down to Salesforce and click 'Details':

The next screen shows your existing linked Salesforce accounts - most likely empty. Click 'Link Salesforce':

You'll be presented with three options. The one we want is 'Salesforce Direct Linking' for offline conversion import. Select this and click Continue:

The next screen provides further information on the linking process. Make sure your browser has popups enabled and click 'Link':

In the popup, enter your Salesforce credentials...

...Then read and confirm you want to provide Google Ads with access...

...Then after a few seconds the link is made. You've completed this step: Salesforce is now a Linked Account in Google Ads.


C. Setup the Conversion Actions in Google Ads

Now Salesforce is a Linked Account in Google Ads we can configure the conversion settings. To get started, either click on 'Go to conversions' from the last step, or you can access the conversion setup directly from 'Tools and settings' menu -> 'Linked Accounts' -> 'Salesforce Details' then click on the 'Not configured' text and select 'Configure':

You'll see a screen like this one showing all the Milestones Google Ads can track and the Conversion actions - currently not set:

Couple of points of note here:

  • The list of Milestones is in alphabetical order not order of conversion events. The default Salesforce order of Lead Status progression is:
    • New > Contacted > Working > Qualified > Converted (= Qualified)
    And the default order for Opportunity Stage progression is:
    • Qualification > Meeting Scheduled > Proposal / Price Quote > Negotiation / Review > Closed Won (or Closed Lost)
  • If you see a message like the one below at the top of this screen it means you haven't correctly set up one or more of the gclid fields in Salesforce. To fix this, go back to Part 3 and add the gclid fields to Salesforce. We've found the easiest way to get Google Ads to refresh the data on this page is to remove and then re-link the Salesforce account.

The relevant Milestones will depend on how you use Salesforce, however typically companies want to track a Qualified Lead and an Opportunity Won. Let's set up a Qualified Lead Conversion Action. Click on 'Create new conversion action':

The first part of the Conversion Action screen let's you set the Goal category - in this case 'Qualified Lead'. You also want to make sure the action is set as a 'Primary action used for bidding optimisation' - which is the whole point of closing the loop with Google:

In the second part of the screen you set the value of this conversion. Here we've set it to $10 - the right value will clearly depends on your business:

In the final part of the screen you set how many times to count conversion events for each unique customer. Typically this should be 'One' as a customer only becomes qualified once. Here you can also set the Conversion Window:

The last step is to Schedule the imports from Salesforce. The Salesforce Linked Accounts page will look something like the below after adding conversion actions. At the bottom of the screen click on 'Import schedule' and set this - we suggest to Daily:

Congratulations! We've completed the fourth step: we are now passing Salesforce conversion events back to Google Ads for ad campaign optimisations.

In fact, with these changes we capture data for all types of visitors to our website who then go on to submit a form. Here's what's captured depending on the source:

Ad Campaign UTM stored in CRM
Lead Pages Visited stored in CRM
Lead Country & City stored in CRM
Lead Device stored in CRM
Conversions sent to Ad source
Google Ads - Paid Search
Facebook / LinkedIn etc with UTM values set
Google - Search n/a n/a
Direct n/a n/a
References

Salesforce Field History: Track Field History for Standard Objects
Google Ads Conversions: About Google Ads Conversion Import for Salesforce
Google Ads Conversions: Import conversions from Salesforce
Google Ads Linked Accounts: Product Linking: Link Salesforce and Google Ads accounts