Integrating offline conversions into Google Analytics can help you optimize your campaigns and website experiences. This is something that we commonly do for our customers when we’re optimizing their inbound funnels. In this post I’m going to go into some of the details about how it actually works.

So, what do I mean by offline conversions? If you’re doing demand or lead generation you’re capturing those leads onsite, typically through a form or a chatbot. As you know that’s only a small part of the much larger funnel, most of which happens offline. Your Marketing Qualified Leads, Sales Qualified Leads, opportunity stages, closed won revenue. Those are all captured offline – and can think of them as offline goal conversions.

In addition to being offline, you also have the distinction, if you’re in B2B, of having individual offline conversions, like qualified leads versus account or company level conversions, like opportunities or revenue.

demand generation funnel

This can also exist in the e-commerce world, especially if you’re in B2B. You might be selling products on your site but also have volume based quote functionality where larger buyers are initiating quotes online and the quote generation and order capture is actually taking place offline.

The biggest optimization mistake that we have seen over the years is using the wrong success metric. And if you’re only measuring online goals, clicks and leads, that can lead to inefficient spend in your paid media campaigns and wasted activity and low quality leads from your website experimentation and optimization.

A solution on the paid media side is ultimately being able to adjust your bids based on those offline conversions. And for your website, assessing the results of experiments and making decisions based on those down funnel conversions.

channel optimization

Google Analytics is often the source of this analysis and decision making. By default Google Analytics is only tracking individual onsite activity. How traffic gets to the site, the bounce rates, page views, etc. Even the goal conversions typically stop at the form completion (on-site).

Google Analytics is great at digesting paid media campaign information website activity, and linking to ad platforms like Google Ads. But the majority of your offline conversion information is happening in different systems. Marketing automation platforms, CRM, or maybe a quote and order management solution.

To solve this we need to integrate those directly into Google Analytics. By doing so we can actually see those offline conversions, like marketing, qualified leads, opportunities, revenue as goals directly in Google Analytics and even evaluate the performance of campaigns, channels, landing pages, everything else in Google Analytics by down funnel goals like closed won revenue.

Backend integration to GA

offline goals in GA 2022-02-07

So here are the main requirements to accomplish this integration:

  1. Understand the important identifiers that Google Analytics uses and store them in your backend platforms.
  2. Capture those offline conversions from those backend systems.
  3. Translating them into the identities and events that Google Analytics expects.
  4. Send hits to Google Analytics via the offline API known as the Measurement Protocol.

full GA integration

Let’s start by understanding the identifiers that Google Analytics uses.

Here, I’m going focus on Universal Analytics. GA4 (Google Analytics 4) is still being rolled out as at the time of this post. A lot of the concepts in GA4 are very different. So we’re still very focused on Universal Analytics.

First off, Universal Analytics has a Tracking ID. This identifies the account and property that you’re going to be sending hits to. If you log into the Google Analytics interface, you’ll be able to see that Tracking ID. You can also retrieve it using JavaScript from the browser.

The second identifier that we care about is the Client ID. This identifies a device or browser. It’s automatically set by the Google Analytics script, persisted in a cookie on the browser and has a predefined structure.

GA tracking id client id

The final identifier is the User ID. This is less commonly used in these use cases. But it is important to understand because this lets you identify an individual user on the site. Unlike the prior two IDs, this is actually set by a site owner, typically post authentication, where the user might be logging in with multiple devices, to identify an individual user and as such it has no predefined structure.

Importantly, when you send offline hits to Google Analytics, you need to include the Tracking ID and either the Client ID or the User ID. So the approach that we’re going to take is to store these identifiers alongside the lead in your backend solution.

And really, there are two options here. If you only care about individual goals and you only care about the Google Analytics tracking, you can store that Google Analytics Tracking ID and Client ID directly in your backend platform.

The second option, which we use at FunnelEnvy and gives us a little bit more flexibility across different implementations and other identifiers that we have to track is to actually capture those GA identifiers, the Tracking ID and Client ID in the browser, and associate them with another Visitor ID that we set as a cookie. Then we store that single ID, that Visitor ID in the backend platform and translate it when we’re setting those hits to GA.

To actually send them to the backend platform, you can populate the IDs that you’re going to use as hidden input fields on the form. When the lead submits that form, the GA identifiers will be saved in your backend platform.

This is relatively straight forward to do in platforms like Salesforce, Marketo or HubSpot, in which you can create custom fields or properties in that backend platform. And then populate with hidden fields in the forms using JavaScript. We commonly do this using Google Tag Manager.

storing GA identifiers in backend

The second step then is capturing the offline conversions that are happening in those backend platforms. The first thing you have to do is identify the offline goals that you care about. If you’re doing demand generation, it’s typically marketing, qualified leads or sales qualified leads at an individual level.

New opportunities closed won revenue, are very common, and if you’re generating offline orders, the generation of the quote or the order itself.

The most common way that we actually capture these offline conversions is triggering a webhook from the source platform for each offline conversion. A webhook is simply an HTTP request that’s made to our system.

Again, these webhooks will have to include the Google Analytics IDs that you’re storing on the backend, or the visitor ID, if you’re taking that approach. And importantly, where you do have an amount, like an opportunity value, a closed won value, an order value, you want to include that because you’ll be able to send that as well to Google Analytics in either the event or order that you’ll be submitting.

Now you can configure webhooks very simply in a variety of these solutions. HubSpot has workflows with webhooks, Marketo natively supports webhooks. In Salesforce, you can code webhooks in Apex or use an application like the Hooked app to visually create workflows and webhooks. Now for some reason you can’t create a webhook as an alternative you can poll through the API or directly from a database.

webhook options hubspot, marketo, salesforce

Once you’ve captured the offline conversions, you’re going toto translate those into the format and the identities that Google Analytics understands. If you’re storing the Google Analytics Tracking ID and Client ID directly in the backend, and you only care about those individual goal conversions, that you don’t really need to do any identity translation. The identity is encapsulated within that Tracking ID and Client ID.

If, however, you are storing the visitor ID then you’ll translate that into the relevant Google Analytics IDs. And if you are tracking account level goals, like opportunities, deals, or revenue at an account level, then you’re going to need to translate your account to all of the contacts that you have available. To do this you’re probably going to need to pull some kind of account to contact mapping from your CRM.

The following diagram illustrates this. For an individual goal, like MQL, you can web hook that directly from the CRM into Google Analytics. Just get the Tracking ID and Client ID and send that on a one-to-one basis to Google Analytics. But if you are sending an account level goal, there’s another step involved of pulling the account to contact or individual mapping, then translating account identifiers into contact IDs, and then into Google Analytics Tracking IDs so that you can send those offline hits to Google Analytics.

individual vs account goals

What you’re really going to want to do is identify all of those offline conversions and then map those to the types of hits that you’ll be sending to Google Analytics through the Measurement Protocol. You’ll want to identify the type, whether that’s account or individual.

Typically for demand generation type of scenarios we use events as the hit type whereas for e-commerce we use orders. As part of this mapping you can identify the relevant fields in those hits and make sure you’re accounting for all of them, including the value, which can be either an actual value coming from the offline conversion or predicted value if you can do that.

map offline conversions

The final step is actually sending those hits to Google Analytics. So for this again, we’re going to use the Google Analytics Measurement Protocol. This is an offline API to be able to send hits directly to the GA servers over HTTP. Now Google Analytics includes a pretty helpful tool that allows you to build and test those offline Measurement Protocol hits.

measurement protocol hit builder examples

So here you can see an example of an event and the event structure that’s sent to Google Analytics. As well as an enhanced e-commerce purchase example that you might use for an offline e-commerce order.

If you are sending event hits, then you’ll want to create a goal of type event so that the goal is triggered on the offline event hit that you’re sending to GA. And if you are sending an event value along with that measurement protocol hit, you’ll want to set the goal value as the event value.

GA goal setup

Unfortunately the measurement protocol has been abused over the years by bots. In the view settings Google Analytics has the ability to block bots. We’ve seen that if you leave the IP address blank, and don’t set an IP address on that Measurement Protocol hit you’re more likely to get that traffic blocked as bot traffic. So we typically recommend setting the IP address of the hit to the same visitor IP that initiated the prior session (that submitted the form), and send that along with your Measurement Protocol hit.

The other thing that you can do that’s really helpful is set a custom dimension along with those measurement protocol hits. One example is to send the buyer stage. So if the visitor is an MQL, if they have an active opportunity, send that as along as a dimension to Google Analytics so you can further segment that traffic and understand what they’re doing on site.

And then finally you can backdate hits, but only up to four hours reliably using the queue time parameter. What that practically means is you can’t expect to send hits days or weeks in the past, you need to be pretty on top of it and this process needs to be running relatively frequently because you can really only backdate those hits by four hours.

I want to spend a little bit of time talking about attribution. By default, the measurement protocol hits that are going to be sent are, will attributed to the direct channel in a new session. The default reporting in Google Analytics uses the last click non-direct attribution model for reporting.

Practically, what that means is that when that conversion comes over offline from the Measurement Protocol, it’s going to be in a new session. But the conversion will actually be attributed to the prior non-direct channel.

So to visualize this that let’s say we have a visitor coming along, hitting the site, viewing a few pages and then submitting a form, and that visitor came in from a paid search ad. When we send over the offline conversion, that’s going to generate a new session which by default it will be attributed to the direct channel. So the conversion is actually going to be attributed to the prior session’s (paid search).

offline conversion attribution in GA

I want to wrap this up with some final thoughts. To be able to track these offline conversions and associate them to marketing campaigns, as well as website experience, you don’t need an entirely new tech stack. You can use Google Analytics in the same way that you have. You just have to integrate the data into it.

As I mentioned the number one mistake that we see when doing optimization of any kind is picking the wrong success metric. And without measuring these meaningful outcomes, optimization experimentation, things like segmentation and personalization are really just vanity exercises.

With these offline conversions, however, you can optimize your bidding through your ad platform, for example, by linking Google Analytics and Google Ads and triggering goal conversions that occur from offline events. And you can optimize your experiences, most importantly, your offers and your form experiences that are most likely to have an impact on those down funnel KPIs.

Finally, if you do have a long sales cycle and a relatively low volume of revenue conversions, you can take this a step further. You can actually take a more frequent, upstream conversion and use a predictive model to predict revenue and optimize faster. As we see from the table below, more frequent conversions (a higher number of conversions in a certain time period), in Google Ads will actually allow the algorithm to optimize faster. So sending along a predicted revenue value with your MQLs can allow that algorithm to optimize traffic much faster, while those down-funnel actual closed won revenue conversions are coming in.

google ads impact of conversion volume