Google Analytics, Search

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 something that’s taken lightly when it comes to data geeks – like me.

Often cited as the holy grail of digital marketing, 100% accurate attribution still remains out of reach but it was definitely 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 and all, but what if you don’t have a GA 360 account, and what if you don’t have Salesforce?

Image Source: Chuck Schaeffer


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 practice 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 just 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 clients’ IP!). Every time a user (more accurately a browser, but more on that later) comes back 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, then 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 that 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 much better at Javascript’s code to fill a hidden field on our site with the Client ID. That way when a user completes a form, not only are we capturing the information they’ve entered, but also 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.

Your form field should look something as shown above.


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

UpBuild has a great CodePen built 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). If you attempt to bring any PII into GA, be it names, phone numbers, emails, addresses, etc. then bad things happen (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 most places and get some reasonable insights and segmentation. For more info on custom dimensions, you can 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.


Step 3

Now that both our GA data 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, 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 invested in manually uploading the data back into GA.


You can find out more about Data Import here.


But in its essence, you just need to format your data in a way 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. Which we won’t go into 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 device (barring signed in browsers), then a new Client ID will be assigned. But take comfort in the fact that no one has cracked that cookie yet (pun 100% intended).

Something else to keep in mind is 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.

Want to read more? Take a look at some more insights from our Google AdWords gurus and follow us on LinkedIn today!

More Articles

Would you like to improve your online conversions? Apply for a FREE quote