This guide describes how to integrate CRM user data into Google Analytics and how to use that data to create AdWords remarketing Audiences.
Overview of different integration options
Universal Analytics makes it possible for webmasters to send CRM data about their users to Google Analytics for segmentation, reporting and creating remarketing lists that can be used in AdWords for display campaigns or remarketing lists for search ads (RLSA).
There are three ways to send CRM data to Google Analytics (which are not mutually exclusive):
analytics.jsand via custom dimensions
- With the Measurement Protocol
- Uploading CSV files via Data Import
There are slight trade-offs among these three methods of sending data but in all cases, the CRM data will end being stored in Google Analytics as custom dimensions.
The key requirement to send CRM data about your users to Google Analytics is that you must have for each of the users for which you want to send CRM data a common identifier that is known both to you and Google Analytics. This user identifier can either be a first party Id that you generate for your user, or it can be a Google Analytics generated identifier. In no case can you use personally identifiable information, including but not limited to email addresses, user logins, social security numbers, or phone numbers. If you plan on using your own user identifier, make sure to review what constitutes an acceptable user Id.
The first step in planning your CRM data integration with Google Analytics is deciding which identifier you will use as the common key between your data and Google Analytics.
One important consideration to keep in mind is that if you plan on sending CRM data via data import, you must use a proprietary visitor Identifier as it is not possible to use the Google Analytics generated Client Id as the user lookup key to join your CRM data.
On the other hand, if you plan to send CRM data through the measurement
protocol, we recommend that you use the Google Analytics
cid as the visitor identifier, but it is also possible
to use your own user Id. If you want to use the Measurement Protocol
with your own user Id, you must also implement
Google Analytics User Id override.
Sending CRM data via data import
Data import allows you to upload your CRM data via files that are uploaded into Google Analytics either manually via the user interface, or programmatically via the Google Analytics management API. As noted above, this approach requires using a proprietary user Id to join your CRM data with the Google Analytics user data.
Below is a high level description of the process for sending CRM data to Google Analytics using a proprietary visitor Id and data import.
The main benefit of this approach is that you can leverage your existing user authentication technology and only use your own user identifiers.
You can use Query Time Data Import to pull in customer value data like churn propensity, customer value, lifetime purchases, and so on, to build GDN, DBM, DFP, RLSA, and Optimize audience lists for remarketing. These lists are also ideal for generating Similar Audiences, e.g., similar audiences for "Platinum Card Users".
Google Analytics' query-time dimension widening (QTDW) allows you to import data after a user visits your site. QTDW will also back-populate audience lists when a new Query Time Data Import dataset is uploaded, attempting to look back at DCLK (or Google Analytics in case of Optimize) cookies for the last 10 days.
This might not be an issue if you are able to upload your entire client database in a CRM file and upload regularly incremental CRM data files on new clients. This will ensure that whenever a known user visits your site, Google Analytics will be able to associate CRM attributes in real-time based on the CRM User Id passed for this user via the tag, if there is matching CRM data that has previously been uploaded to Google Analytics.
On the other hand, if a user visits your site and Google Analytics does not find matching CRM data from the data files that have been uploaded to Google Analytics, no CRM attributes will be associated with this user in Google Analytics, even if you upload a data file containing CRM information for that user's CRM Id after the visit.
Sending CRM data via the Measurement Protocol
The second option for sending CRM data to Google Analytics is to use the measurement protocol. With this option, you can use the Google Analytics generated client Id or your own user Id as the lookup key to join your data with Google Analytics data.
Let's first review what the implementation looks like when using Google Analytics client Id. This approach requires you to keep track of the client Id generated for your website visitors and map this Id to the corresponding CRM user identifier for the same user.
Measurement Protocol with Google Analytics visitor identifier
When a user visits a site tagged with Google Analytics, the Google Analytics tag creates an Id called cid (client Id) for that user if it has not been set already and stores it in a cookie. The diagram below illustrates the steps required to send CRM data via the measurement protocol using the cid as the common user identifier between your CRM and Google Analytics.
The main benefit of this approach is that CRM data sent as custom dimensions via a measurement protocol request is associated immediately with the Google Analytics user it applies to. This means that Google Analytics checks whether each visitor for which CRM data has been set is eligible to be added to any remarketing list on the basis of the new CRM data associated with the user.
The downside of this approach is that you must keep track of the Google Analytics Client Id for each of your site's visitors and be able to create a mapping of Google Analytics Client Id to your own CRM user identifiers.
Measurement Protocol with your own visitor identifier
To send visitor data via the measurement protocol using your own user identifier, you must also adjust your Google Analytics tag to implement a feature called user Id override.
This means that you must passed to the Google Analytics tag your own User Id on every Google Analytics tag event (ie: pageview hits, custom event hits, eCommerce hits).
When you enable User Id for a Google Analytics property, two profiles will be created for that property. One will be sessionized using the Google Analytics identifier (cid) and one will be sessionized using your user Id (uid). Note that the profile that is sessionized based on your user Id will only contain data for users for which you have set a user Id. Hits for which no user Id is set are discarded from the User Id profile. The exception to this rule is for cases when you start passing a user Id for a visitor during a session (for instance, at the point when a visitor signs-in or registers). In this scenario, Google Analytics will associate the tag events sent prior to the authentication with the User Id set for that visitor (this is sometimes referred to as hit stitching).
With this approach, you get the best of both worlds in that you can use your own user identifier and not worry about keeping track of Google Analytics's cid for each of your users. You can also trigger remarketing list additions immediately upon sending CRM data. In addition, you also get the benefits of User Id override, which include cross-device attribution, cross-device user paths etc. You can read more about the benefits of the User Id feature here.
The only caveat of this approach is that your Google Analytics view of your web activity will be split in two profiles: one will have all your traffic, but no insights on cross-device activity, and one will have data on your user Id traffic only, but with insights on cross-device activity.
What constitutes an acceptable User Id
If you plan on using your own user identifier to join your offline data with Google Analytics's data, there are a few things to keep in mind when choosing what value to use as your user Id.
First, per Google Analytics terms of service, you may not use an identifier that contains personally identifiable information (PII). This rules out email addresses, user logins, social security numbers, phone numbers or any piece of data that is deemed to be "PII".
You can use non obfuscated alphanumeric database identifiers that you might create for your visitors. Another acceptable option is to pass to Google Analytics an encrypted identifier that is based on PII that is not Protected Health Information (as defined under HIPAA), as long as you use the proper encryption level. Google has a minimum hashing requirement of SHA256 and strongly recommends the use of a salt, minimum 8 characters.
Summary of CRM data integration options for Google Analytics
The table below summarizes the pros and cons of the integration methods available.
|Integration Method||User Identifier||Pros||Cons|
|User Data Import||a user identifier of your choice which is passed to the Google Analytics tag via a custom dimension||
|Measurement Protocol with cid||Google Analytics visitor identifier (cid) which you must link to your own CRM database||
|Measurement Protocol with uid||a user identifier of your choice which is passed to the Google Analytics tag via user Id override||