Linking offline conversions to online clicks How to push data from your CRM into Google Analytics

  • shutterstock_129614792.000
  • shutterstock_129614792.000

Many marketers wrestle with the challenge of attributing credit for offline sales to the online channels that created and nurtured the lead. This challenge is particularly hard when the sale occurs offline as the data is generated and stored in a different database – usually a customer relationship management (CRM) solution.

Without this information, campaign managers will only be able to make broad assumptions about which digital channels are more – or less – effective, and will find it difficult to optimise individual campaigns to ensure the best return on investment.

Some CRM vendors have recognised the importance of the issue and are developing tools and plugins to automate the process of pushing data into Google Analytics (GA). For example, the AdWords Conversion Import for Salesforce is a welcome addition, although it still requires technical expertise to set up and configure correctly.

In this technical article, we use real-world examples to show how offline sales activity such as receiving a sales phone call, qualifying a lead, or signing a contract, can be pushed from your CRM database into GA: giving you a better understanding of the true value of different types of online marketing campaigns.

The issue – linking offline sales activity to online clicks

If you can track some kind of online conversion, then you can optimise on this metric. For example, PPC campaign managers usually focus on optimising cost-per-click (CPC) and click-through rates (CTR), often tracked through to a ‘Goal’ such as web form submissions. Successfully optimising campaigns based on CTR or CPC will reduce the cost per Goal completion, but they will not identify which campaigns and keywords are contributing most to revenue and profitability.

In the following example the company is investing in a number of PPC campaigns. A standard Google Analytics (GA) implementation will track conversion rates, measured by the number of Form Submissions. These Forms are then picked up by the offline sales team, at which point the link between PPC investment and sale is broken, and without manual intervention the campaign manager will not know which specific clicks resulted in a sale:

Table 1

Finding a way to automatically push offline sales data from a CRM system into GA will not only provide granular feedback linking offline sales numbers to campaign clicks, it also makes it possible to link other sales data, such as revenues, to specific campaigns and keywords:

Table 2

For campaign managers, having the ability to see the offline sales data makes for much more informed and intelligent decisions, leaving you one step ahead of the competition.

In GA, this generates a powerful single screen view of a campaign, which also includes offline data:

tracking offline date

Examples of how offline data can help with online campaign optimisation

Before we explain how you would implement this it might be worth illustrating how you might typically use this with some real world examples. 

  • Lead generation campaigns

Lead generation is a common online strategy for a lot of businesses, especially those in the B2B space where the sales process is complex, takes a period of time, but the revenue opportunity of each sale is high.  In this case, the offline outcomes that could help further optimise the campaign in GA will include: if the lead converts into a sale, the value of the sale, and the profitability of the customer.

  • Free samples

Online retailers sometimes offer free samples where consumers need to see the product before committing. Customers might then return on a different machine to buy, or make a purchase over the phone, and this information needs to be joined together in GA to be visible in one interface.

  • Catalogue requests

Generating online catalogue requests can be expensive, but it is only when you can see the eventual sales start to come in that you can be confident that the traffic that generated the requests is of any value and optimise accordingly in GA.

  • Free trials

A lot of tech companies offer free trials for online services. When they eventually commit to buying or subscribing, we want to be able to ensure that the credit is attributed to the online campaign that generated the original trial, and not – for example – to the ‘brand’ search they performed to find your telephone number before ringing to book the order. It may even be that the user does not need to login to sign up if billing commences after a trial period, in which case being able to push this information from your back-end systems into GA will identify exactly which campaigns to optimise.

  • Phone sales

Buyers of complex products often look to buy after a telephone conversation, and as such are un-trackable in a standard GA implementation. However, it is possible to link actual phone calls with specific online campaigns and prospects/clients, and subsequently to push these offline outcomes back into GA.

How to push offline data into Google Analytics

Step 1: deciding which identifier you want to use

There are two identifier options for this in GA – client ID or userID.

clientID – This is an ID that is generated by the Google tracking script and usually sits in a cookie in the user’s browser. Whenever someone submits a form or makes contact you can capture this ID and ensure it is stored alongside that person’s record in your CRM. From there it can be used to process offline tracking. Note that (confusingly) the term ‘client’ refers to the software client, rather than the prospective customer. The clientID option works well for scenarios where the typical order of events is online lead followed by offline actions, and where it is difficult to get a user to sign in on return visits.

GA provides a function to access this clientID so you don’t have to access the cookie directly yourself:

ga(function(tracker) {
  var clientId = tracker.get('clientId');

userID – This is one of Google’s recent functionality additions and allows you to push an ID that you hold for a visitor/user with every hit that gets processed, be it online or offline. This ID is usually the ID from your CRM. For this to work effectively, however, you need to ensure this ID is generated at every opportunity in your tracking code, and especially in the session where the important activity that you want to track has occurred. This can be done, for example, by ensuring that the "Thank You" pages that are presented after completing a contact, free trial, or sample request, creates a record in your CRM and assigns the unique userID to that record. The userID identifier requires a few additional steps to ensure you get the required functionality but results in a very powerful way to capture offline data.

The GA function to access this data is:

ga('create', 'UA-XXXXX-Y', 'auto', {
  userId: USER_ID
ga('send', 'pageview');

More information on userID can be found on

Step 2: Pushing Offline Data Using the Measurement Protocol

Once you have implemented either of the above ID solutions the final step in the solution is to push data about actions from the CRM to GA. To do this, we use what is called ‘the measurement protocol’ to set the values of the parameters you need to see in GA. The measurement protocol is a request for a URL in which the parameters have been defined, for example: v=1&t=pageview&tid=UA-XXXXXX-YY&cid=12345.54321&ec=EventCategoryName&ea=EventActionName&el=EventLabelName&dp=Offline

Ideally, you would program your CRM to carry out these actions automatically as and when offline events occur, but there is no reason these can’t be done manually or processed in batch using a spreadsheet solution.

You can push any of the following categories of data into GA: 'pageview', 'screenview', 'event', 'transaction', 'item', 'social', 'exception', and 'timing', which allows you to track activities such as:

  • Sales – details of the actual transaction such as product type and order value.
  • Contract signing – when a contract gets signed, along with a value you might want to place on it.
  • Qualifying a lead – filtering out low quality and spammy leads, to leave only genuine enquiries. This is a particularly fast and useful way to measure traffic quality.
  • Inbound phone call – where a CRM contains data from a call tracking solution such as like ResponseTap or Infinity Call Tracking.
  • Phone call outcome – tracking the outcomes you want to see in GA.


Accessing data regarding offline sales outcomes is a powerful way to ensure that online campaigns are correctly optimised, and helps marketers to provide evidence for the financial return generated from investment in online marketing.

Automated solutions work by allocating unique identifiers and programming your CRM to push data into GA, triggered by specific 'events'. Successful implementation requires technical competence and a clear understanding of the business goals of the campaign, but the benefits of doing so, particularly for organisations generating high-volume or high-value leads, make it a worthwhile investment.

For more information

If you would like to learn more about tracking offline conversions or integrating your CRM technology, then please get in touch: we have an in-house team of over 100 sector and technical specialists who are on hand to answer any questions you may have and advise on best practice.