Analytics with Ottimo
Getting company data into Google Analytics with 6sense
In this tutorial, we’ll show you how to integrate 6sense with Google Analytics.
Why is 6sense valuable?
6sense is a tool that does a ton of things, but one interesting use for content marketers is that it shows what companies are visiting various pages on your blog. And you can take it one step further by integrating 6sense with Google Analytics so that you can run all your regular reports together with company data.
Why is that useful? For example, if you can show that certain blog posts are attracting people from companies that are in your ideal customer profile, that's really helpful in terms of demonstrating the value of what you're writing.
You can also share this data with your sales team for prospecting and engaging with potential customers. For example, you can let them know that a company that they've engaged is actually coming to the site. You can see what pages those leads are looking at and therefore what topics they might be interested in.
Step 1: Add the 6sense tag to your site
After you sign up for 6sense, you need to add the 6sense tag to your site.
You can obtain the necessary script from 6sense documentation: It looks like this:
This script is available in the user interface:
(You can also ask your customer success manager for these things.)
Once you've done that, you'll see that there is a callback variable here called processEpsilonData:
Anything in our processEpsilonData function will fire after 6sense has gotten its data. We’ll take advantage of this to fire a custom event that tells GA4 we have company data available.
Step 2: Add a trigger for 6sense data acquisition completion
Next, you need to add a trigger that signals that 6sense has data available to send to GA. The trigger is the 6sense Custom Company Details Loaded Event.
Ensure that there's a trigger type (ie “Custom Event”) and an event name.
Step 3: Hook up Google Analytics
The last step is to hook up your Google Analytics so that it fires after the 6sense Company Details Loaded Event happens.
Why is this important? Because we need this to fire after we have 6sense Company Details. We can't just fire Google Analytics 4 by itself. If we do that, then we won't have the data from 6sense and therefore all of these fields will be empty.
Take your Google Analytics 4, change the triggering to this new 6sense Company Details Loaded Event (as shown above).
Next, go into Variables. Add a variable for each thing that you care about, such as company name, domain, company state, and employee range. For example, here’s what it looks like to add a variable for company name.
It's going to trigger off a data layer variable name of company name. All of these come from here:
We did a window data layer push and we pushed company_name. If you wanted to get Domain, you'd add one called Domain.
If you wanted to get Domain, you'd add one called Domain. If you wanted to get Company State, you'd add one called Company State.
Those would all be new variables where you would put the data layer variable name here.
And then the name of this within Google Tag Manager is whatever you want to call it. In this case, it would be 6sense company name.
And then you go back to your Google Analytics 4 tag, and you add company name there:
And then you add 6sense company name there:
Do that for whatever variables you want. And then when you hit preview:
And you use the Google debug view or the debug Chrome extension.
You will see that under page view, setting it to undefined, scroll down. You'll see event parameters.
Company name is Ercule.
Step 4: Create custom dimension in Google Analytics
Next go to the Custom Dimension section in Google Analytics.
You need to create a custom dimension:
So here it's called company_name. So you go to the Dimension Name. We’ll enter our example: “company_name”. And in the Event parameter as well: “company_name”.
This allows you to use the data in reports. The custom dimension should have the same name as the data layer variable name.
And once you do that, you're going to be able to use company_name in reports in Google Analytics 4. Repeat for any other data you’d like to see in GA.
Everything we have to say on SEO, content performance, and content analytics – in convenient email form.
(Having doubts? Here's a recent issue.)