How to Integrate Google Analytics with Your CRM for Better Content Analysis

Everlytic
5 min readNov 1, 2019

Site usage systems like Google Analytics can be an incredible support when tracking your content campaigns. It’s no wonder many content marketers want to use it to match a user who interacts with your site to a CRM record. But this can be problematic, as site usage data sits in Google Analytics, while your user data sits in your CRM.

Can you integrate the two? Sometimes — particularly if your site visitors need to log in first. Let us explain…

The Value in Integrations

Firstly, it’s important to know why you’d want to integrate Google Analytics with your CRM or lead management tool.

Simply put: Google Analytics’ engagement and conversion metrics, like time on site, pages per session, bounce rate, and attribution can help you segment the data by channel to see which content provides the highest engaged audiences. If you use tracking URLs (UTMs) you can even trace back to which specific piece of content performed best.

Although not an explicit measure of content value, bounce rate can be combined with the time on page metric to understand a piece of content’s value. A page with a high bounce rate and low page time denotes poor value, whereas a page that has a high bounce rate and a high time on page may mean the content was engaging and solved the user’s need.

By integrating Google Analytics with your CRM or lead management tool, you can combine this data with your lead data to see how different segments of your target audience respond to your content (read more in Everlytic’s white paper on launching and analysing content campaigns). With this knowledge, you can adapt your content to more accurately target the audience you want.

Closing Your Data Gap

In most cases, integrating Google Analytics with your CRM isn’t a simple process. But there is a workaround. And it involves Google’s ability to generate a unique but anonymised ID.

This random identifier (called the Google Client ID or GCLID) is created for a user when they land on your site, allowing a single user to be tracked during a single session. The problem is that, in its basic format, the anonymity of this ID means that you still can’t connect that user to a specific customer in your CRM.

Luckily, Google Analytics does enable you to replace the GCLID with a unique user key. And back in your CRM, your users will also be identified with a unique User ID. So, the trick is passing this information into Google Analytics so you can see specific user interaction data.

Note: Google will never allow you to pass any personally identifiable information into their system; an anonymised ID, on the other hand, is permissable.

Integration Guidelines

This solution is great for online services like ecommerce sites, where users are required to log in to your site first. Once they do this, you can capture their User ID and pass it into Google Analytics with a custom JavaScript snippet, using cookies or the DataLayer.

The easiest and most effective method of achieving this is to use Google Tag Manager. The basic process has four steps:

1. Install a tag manager like Google Tag Manager on your site. Without this, you won’t be able to set up the variables required to capture and send the UserID to Google Analytics.

2. Enable UserID reporting in Google Analytics. This will create a completely new view in the system dedicated to data that includes the UserID. This view excludes demographic data because it can trace back to a unique individual, which is against most privacy laws.

3. Capture the UserID. This can be tricky, depending on your setup. Here are a few ways to do it:

  • Get your developer to push the UserID to the DataLayer. It’s probably the most stable way. Once the UID is in the DataLayer, you can create a DataLayer Variable in Google Tag Manager to push to Google Analytics. Make sure you use the same name for the variable and the UserID in Google Analytics.
  • Pass the UserID in a cookie. This can be done through the DataLayer or by the developer using some custom JavaScript. The cool thing about storing the UserID in a cookie is you can persist the session even after a user closes the site (as long as they don’t clear their cookies). This way, even if the user hasn’t logged back into your site but is on it, you can still connect that session to that user in your CRM. There is a great article by Simo Ahava on this here.
  • Use a JavaScript variable without a cookie. In this way, the UID is passed into Google Tag Manager using a Custom JavaScript variable, which can then be sent to Google Analytics.
  • Scrape the DOM (Document Object Model). This risky (and not recommended) method of capturing a UID requires it to be displayed on the website as, say, a text element. You then ‘scrape’ this content from the page and assign it to a variable in Google Tag Manager, which then passes it to Google Analytics. Please note: This can be a flaky process and it’s prone to errors.

4. Lastly, update your Google Analytics Variable Settings in Google Tag Manager to accommodate the new UserID. To do this, add a field called userId with the UID variable into your Google Analytics settings in Tag Manager.

Now, each time a user logs in, an ID should be generated, captured, stored, and sent to Google Analytics for you to analyse. For a more in-depth guide on setting this up, read this article on Analytics Mania.

Once Google Analytics has the User ID, you can connect this to data in your CRM using the User ID as the common key and, voila! Specific user interaction data. 😊

For more information on building a content marketing strategy for your business, sign up for Everlytic’s educational series: How to Maximise Your Digital Content to Grow Your Business.

. . .

About the Author: Rhys Downard

Rhys is the Director and Lead Digital Marketing Analyst at Media Rocket, a multi-channel digital marketing company that helps tech companies attract and convert more prospects into real leads.

Find out more at: mediarocketstudio.com

Originally published at https://www.everlytic.co.za on November 1, 2019.

--

--

Everlytic

Marketing automation software that enables data-driven and hyper-personalised communication via email and SMS.