How do I set up Reveal Custom Dimensions?

What is a Custom Dimension?

Custom Dimensions are sent to analytics as parameters attached to hits, like page views, or events. Each custom dimension needs to be set before a tracking call can be made in order for that value to be sent to analytics. Each one is assigned a unique index number that differentiates one dimension (or metric) from the other. Each Clearbit attribute will need to be assigned a dimension and index number to be tracked from your website to GA.

 

How do I set up Custom Dimensions in Google Analytics?

To create a set of custom dimensions within Google Analytics, you'll need to create a one-to-one mapping of Clearbit attributes to Google Analytics dimensions.

Navigate to  Custom Definitions then Custom Dimensions within the Google Analytics Admin panel to begin adding. Create a custom dimension for each of the properties you want to include, with a 'Scope' of 'User'. Mark Active.

file-J7bDyFloXn.png

We recommend these for best practice:

  • Company Name
  • Company Domain
  • Industry Tags
  • Industry
  • Sub Industry
  • Employee Range
  • Estimated Revenue Range
  • Global Alexa Rank
  • HQ City
  • HQ State
  • HQ Country
  • SIC Code
  • Time Zone
  • Tech Stack

(We do recommend adding as many of relevant Clearbit dimensions from the beginning as you can so there aren't any gaps in your analytics. GA is not retroactive, so if your team thinks it may use some of this data in the future, it's best to go ahead and collect it if you have the dimension available.)

file-zVG2tiH8wx.png

You can choose to create as many or as few dimensions as you think is helpful, however you can only have up to 20 in GA total. Which means if you already have existing dimensions you will need to rename them.

Make sure you keep a note of the dimension numbers to check the js script that you will add to your website.  Based on the dimensions you pick, your code could different. You just have to make sure the numbers align EXACTLY.

Compare the Dimension naming conventions and numbers in the above image to the script below. They match 1-for- 1.  This code will push to all properties with a tracker name on the page. For specific ones, see this article.

<script>
ga_trackers=[]; ga.getAll().forEach(function(x,i){ ga_trackers.push(x.get('name'))}); ga_trackers.forEach( function(gaName){ ga(gaName + '.require', 'Clearbit', { "mapping":{
"companyName":"dimension1", "companyDomain":"dimension2", "companyTags":"dimension3", "companySector":"dimension4", "companyIndustryGroup":"dimension5", "companyIndustry":"dimension6", "companySubIndustry":"dimension7",
"companyType":"dimension8",
"companyEmployeesRange":"dimension9",
"companyAlexaRank":"dimension10",
"companyCity":"dimension11",
"companyState":"dimension12",
"companyCountry":"dimension13",
"companyFunding":"dimension14",
"companyRevenue":"dimension15"
}}); });
<\script>

<script async src="https://ga.clearbit.com/v1/ga.js?authorization=pk_YOUR_KEY">
</script>

Add your Clearbit GA plugin code to your site  by inserting the script above underneath the Google Analytics standard `ga('create')` and `ga('send', 'pageview')` sections.

Depending on the way you manage your Google Analytics account, you’ll find full integration instructions below for each:

I manage Google Analytics Google Tag Manager

I manage Google Analytics directly