I've got two primary fields I'm using to connect our Google Analytics (GA) data with our BI cube. As you mentioned, Date is an obvious one, but I'm actually having trouble with that -- can't seem to get Tableau to accept a relationship between GA's date dimension and the BI cube's.
Side note: you need to make sure the User ID is anonymized -- it can't be something like an email address or phone number, b/c Google forbids you from storing any personal info in their system. And you should probably have some legal/privacy language on your site explaining what you're doing with the data. But that's a whole topic of it's own.
1, // This custom var is set to slot #1. Required parameter.
'User ID', // The name of the custom variable. Required parameter.
'[INSERT USER ID - like 123458602938420347]', // The value of the custom variable. Required parameter.
1 // Sets the scope to visitor-level. Optional parameter.
Once you've declared the User ID with the code above, you have to send it to GA with either a standard page view call or an event tracking call. i.e. one of these methods: '_trackPageview' or '_trackEvent'.
Here's more detail on it from Google: https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingCustomVariables
And here's the updated version called Custom Dimensions that you may have to use depending on which code type you selected when you set up the property in GA. (If you picked App or Universal Analytics for website, then this is the version that's for you. It's pretty much the same thing as Custom Variables, except now you go into the Admin console of GA first to name the variable and set the scope of how long the value persists rather than passing those directly in the code as above.)
Justin Cutroni has some interesting posts on other things you might use Custom Variables to track on his blog:
The cool thing about the universal User ID is that you can start to connect online and offline behavior or cross-platform behavior (the same person on their computer vs. their iPhone) and tailor experiences to your customers based on a more holistic view of their interactions with your company. Of course, this is limited to people who are actually logged in and have identified themselves in some way. For all the other anonymous visitors on your site, the Date connection is probably the only thing you'll be able to link between GA and your other data sets.
1 of 1 people found this helpful
That is outstanding information! Thanks for sharing!
Emily thank you so much for taking so much time with that, so helpful. I'm excited to be able to move further with this, as I think that's really where the addition of GA to Tableau can reap the most benefits. A thousand thanks!