How to Integrate Reveal GA and Segment

 

Reveal will identify anonymous IP traffic on your website and match to a company domain, while providing company attributes along with it. One of the easiest ways to try Reveal on your site is to set up the Google Analytics free trial. This guide will show you how to configure Reveal in GA with Segment.

Using Reveal with Google Analytics will help you:

  • Know which companies are on your site, in real time.
  • Measure conversion rates by industry, location, size, etc.
  • Send reports to your sales team to notify them of larger account opportunities.
  • Create audiences for remarketing campaigns.
  • Deliver personalized content to visitors.

 

*Note: This is NOT a guide to activate the Clearbit destination inside of Segment. You WILL need to add the Clearbit Reveal JS snippet manually outside of Segment.

 

Create a Clearbit Account

Sign Up for a free Clearbit Account. Once you are logged in, on the side panel you’ll head to “Getting Started” at the top left.

 

Screenshot_2018-09-18_11.46.55.png

Under Suggested Integrations, you’ll choose Google Analytics (Not Segment) to use our Setup Wizard.

 

Screenshot_2018-09-18_11.57.37.png

 

Create Custom Dimensions in GA

If you are using our Wizard you’ll be able to create these dimensions automatically. However if you have used up a majority of your custom dimensions you will need to rename them manually.

 

*Note: You’ll know if you don’t have enough custom dimensions (max 20) if you see this error our set up Wizard:

badRequest: Error creating this entity. You have reached the maximum allowed entities of this type.

 

Navigate to Custom Definitions and Custom Dimensions within your GA Admin panel. You can start off with a the custom dimensions we suggest in our Setting up Dimensions Guide. Create a custom dimension for each of the properties below, with a 'Scope' of 'Session'. 

Screenshot_2018-10-02_13.41.11.png

For best practice, set up as many as you can from the beginning so that there are not gaps in your analytics reporting. It also doesn’t matter which dimension you map these to as long as you make them match your Reveal JS snippet 1 to 1.

 

Create your JS snippet

Next you’ll need to build your Reveal JS snippet. If you are using our Wizard, we will create this for you. However you may find you need to adjust the mappings to reflect the custom dimension numbers you just created.

The analytics ready line will also make sure that Segment loads GA onto the page first. Double check this line is there if you are seeing error: GA not defined in your console.

Finally be sure to update the key in the authorization param to the publishable key provided on your Clearbit dashboard.

 

<script>
analytics.ready(function(){
  ga('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",
"companyTech":"dimension16" 
}
});
});

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

 

Add the Reveal JS Snippet to your site

Yes, you DO have to add the snippet to your site. The Clearbit Destination inside of Segment will not work without our Premium plan, so you’ll need to configure the JS on your site to connect to GA. Add your Reveal JS snippet underneath the Segment Snippet:

<!-- Start Segment -->
<script>
 THE SEGMENT JS WILL BE HERE
</script>
<!-- End Segment -->

<!-- Start Clearbit -->
<script>
analytics.ready(function(){
  ga('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",
"companyTech":"dimension16"  
}
});
</script>

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

 

When you are ready to start using the data, our guide on How to Build a Dashboard in GA will help you with these last steps!