How to upload CRM data into Google analytics without GA 360

How to upload CRM data into Google analytics without GA 360

When Google unveiled its Salesforce integration plan in November 2017, it’s fair to say it was met with some excitement. Uploading CRM data into Google Analytics isn’t taken lightly when it comes to data geeks – like me.


Written by

Preet Singh

Published

7 May 2018

Categories

Data

Often cited as the holy grail of digital marketing, 100% accurate attribution remains out of reach, but it was a step in the right direction from the Big G. At least for Salesforce users, which, according to reports, is continuing to increase its market share YoY – maybe a Google CRM will be the next big step?

So this integration is great, but what if you don’t have a GA 360 account, and what if you don’t have Salesforce?

In January 2018, the Big G released the integration, but with no word on when or if this tech will reach standard GA or other CRM platforms – it’s time to take matters into our own hands. If you Google “CRM Integrations with GA”, there’s a whole host of guides from the super technical to the very basic. In this guide, we’ve put together a solution we’ve used to get a Google-CRM link up and running, with input from the super bloggers, the Javascript die-hards and best practices from the Big G themselves.

The one key to rule them all

To get married, you need a ring and two people. To marry your data, you need a key and two data sets. Thankfully, you already have the key – you probably don’t know it yet.

Every user that visits your site gets cookied by GA and is assigned a unique ID (called a ClientID or CID for short). It’ll look something like this: 707931547.1508748512. For the curious, you can see all your users in the user explorer tab under Audience in GA (if you see a user with time on site of 300+ hours and 540 conversions, you probably need to filter out your or your client’s IP!). Every time a user (more accurately, a browser, but more on that later) returns to the site, GA will tag their session with this ID.

While this is interesting, it’s not particularly actionable. While we have a lot of data on a specific user’s interaction with the site, we don’t have a way to group our users. If your payments occur offline, you won’t even be able to attribute a $ value to a user. But you already have this information in your CRM – you know how much a customer spent, what they bought, when they bought it, etc., but what percentage of the leads we drove from paid search resulted in a payment? Wouldn’t it be great to segment your GA data the same way you segment your CRM data? How do we do this?

Why we use the key of course.

Borrow the Key

Step 1

Google Analytics showed us the key; now, we need to borrow it. For this, we use someone who is much better at Javascript code to fill a hidden field on our site with the Client ID. That way, when a user completes a form, we capture the information they’ve entered and the ID that GA has tagged them with. Then, when an entry is created within your CRM, you can capture this value in an extra field.

You can set the ID however you like, but for ease of demonstration, we will use ‘cid’.

UpBuild has a great CodePen that demonstrates how it should work, and we don’t like reinventing the wheel, so click here for their pen.

In the script, you will have to insert your own UA ID for your GA account, but other than that, you shouldn’t have to change a thing (unless you used a different id value instead of ‘cid’). It should be noted as well that you can implement this through GTM as well with a custom HTML tag.

Now, just set up a field in your CRM to receive this data just like you would for any other customer information, and now we have a unique ID assigned to our user information. The next step is to perform some setup so you can upload your data to Google Analytics.

Note: This is as close as you want to get to matching GA data to PII (Personally Identifiable Information). Bad things happen if you attempt to bring any PII into GA, be it names, phone numbers, emails, addresses, etc. (link text). You have been warned!

Move the key

Step 2

As mentioned, we can’t really use the User ID in GA where it sits by default. So we need to get it somewhere we can work with it. The easiest way to do this is with a custom dimension. By setting our newly borrowed key as a custom dimension, we can use it in most places and get some reasonable insights and segmentation. For more info on custom dimensions, click here.

Create your custom dimension and set the scope to user level.

Then you will use the code above, changing the dimension# to your corresponding custom dimension index that you created, and your UA-ID to your own.

Then you need to populate the ClientID with the variable that we filled our hidden form with previously. Now we can set up a custom report using our custom dimension and see all our user traffic by source/medium and channel groupings.

Fusion

Step 3

Now that our GA and CRM data have the key, we need to fuse the two (no dancing required).

The easiest way to do this would be in Excel, where we can take our GA Custom Report export and our CRM export and pivot out our two data sets based on the key, giving us all our CRM data alongside our GA metrics.

Preferably, though, you can push this data into GA using the Data Import function. This allows you to see everything all in one place online and action any insights. However, this requires some time to upload the data back into GA manually.

You can find out more about Data Import here.

But in its essence, you just need to format your data so that GA can understand it and then upload a . CSV file to GA.

Another method which is a bit more complicated is through the Measurement Protocol. We won’t go into this here, but is a great way to automate and save time in this process, as you can schedule a data push into GA, which will keep all your data in sync and ready to go.

This requires a bit more technical know-how, but there is a lot of support documentation out there.

That’s it.

Now, you have an active CRM data integration with Google Analytics, with actionable insights and feedback for all your digital activity. Go forth and attribute!

The one major caveat with this, as with all attribution, is that as soon as a user changes the device (barring signed-in browsers), a new Client ID will be assigned. But take comfort that no one has cracked that cookie yet (pun 100% intended).

Something else to remember is that Google’s updated Data Retention policy, which takes effect on the 25th of May 2018, requires you to set your data expiration period.

More info here.

The dog and bone.
Subscribe and be the first to hear about news and events.

Written by

Preet Singh
The dog and bone.
Subscribe and be the first to hear about news and events.
View our last posts
Two hands transferring file date in website migration

How to Migrate a Website Without Losing SEO Traffic

Chloe Zheng - 15 min read
Magnifying glass over webpage: Grow your business with Google Ads.

How Google Ads Can Help You Advance Your Business Goals

Ophelia Bernhardt - 7 min read
Hand holding phone with Chatgpt logo

How to Humanise AI Content: 7 ChatGPT Tips

Brίd Flynn - 6 min read
Team members thinking together
Get in touch
Ready to get the ball rolling? Drop us a line.
First name*
Last name*
Email address*
Phone number*
Company*
Your message