By integrating Albacross Reveal with Google Analytics, you are able to enrich the visitor information with firmographic data for more detailed segmentation and attribution reporting.
To get started you will need to follow the steps below:
Install the Albacross Reveal Script
To enable the data flowing from Albacross into your website to identify the company of each individual visit, you need to start with adding the Reveal Script on your website.
Note: This is a different script than the Albacross Tracking Script, which also keeps track of the acquisition and activity data of your visitors.
<script type="text/javascript"> (function(a,l,b,c,r,s){ _nQa=c,r=a.createElement(l),s=a.getElementsByTagName(l)[0]; r.async=1; r.src=l.src=("https:"==a.location.protocol?"https://":"http://")+b; s.parentNode.insertBefore(r,s);}) (document,"script","serve.albacross.com/reveal.js","{{API_KEY}}"); </script>
When the script has been installed, each visiting IP will be revealed and stored in the client session of your browser and available for Google Analytics to access the values.
Access your Google Analytics account and go to 'Admin' settings in the bottom right corner
Go to 'Custom Definitions'
From the expandable list, choose 'Custom Dimensions'
Create a new Custom Dimension for each dimension you want to enrich with Albacross data
For each dimension, you want to add from Albacross
1. Set the name as the display name you want in Google Analytics
2. Set the scope to 'User'
3. Make sure that it is 'Active'.
Click 'Done'. Example codes can be set to the default values
Implement Google Analytics + Reveal code on your website
You are able to implement this code directly on your website or through Google Tag Manager. Before you launch this, make sure that you have chosen all the data points that you want to enrich from Albacross, and mapped them to the correct dimension.
In the code, these dimensions are marked as 'dimension1' and similar which reflects the index number in your Custom Dimensions list.
IMPORTANT: Keep in mind that the data below needs to be mapped up to match the data and custom dimensions you want to enrich your Google Analytics instance with.
ga(function() {
ga_trackers = [];
ga.getAll().forEach(function(x, i) {
ga_trackers.push(x.get('name'))
});
ga_trackers.forEach(
function(gaName) {
var timeout = 0
function poll() {
if (!(timeout > 3000)) {
if (!window.AlbacrossReveal){
timeout+=50
return setTimeout(poll, 50)
}
if (!window.AlbacrossReveal.company) {
timeout+=50
return setTimeout(poll, 50)
}
}
try {
if (window.AlbacrossReveal.company) {
var companyName = window.AlbacrossReveal.company.name;
var companyCountry = window.AlbacrossReveal.company.country;
var companyFounded = window.AlbacrossReveal.company.founded_year;
var companyAlexaRank = window.AlbacrossReveal.company.alexa_rank;
var companyEmployeeMin = window.AlbacrossReveal.company.employees ? window.AlbacrossReveal.company.employees.from : '';
var companyEmployeeMax = window.AlbacrossReveal.company.employees ? window.AlbacrossReveal.company.employees.to : '';
var companyLinkedInCategory = window.AlbacrossReveal.company.linkedin_industry_code ? window.AlbacrossReveal.company.linkedin_industry_code.category : '';
var companyFinancialsMin = window.AlbacrossReveal.company.financial_report ? window.AlbacrossReveal.company.financial_report.from : '';
var companyFinancialsMax = window.AlbacrossReveal.company.financial_report ? window.AlbacrossReveal.company.financial_report.to : '';
var companNACECategory = window.AlbacrossReveal.company.nace_code ? window.AlbacrossReveal.company.nace_code.category : '';
var companyCity = window.AlbacrossReveal.company.address.city;
var companyState = window.AlbacrossReveal.company.address.state;
ga(gaName + '.send', {
hitType: 'event',
eventCategory: 'Albacross',
eventAction: 'DimensionSet'
});
ga(gaName + '.set', 'dimension13', companyName);
ga(gaName + '.send', {
hitType: 'event',
eventCategory: 'Albacross',
eventAction: 'DimensionSet'
});
ga(gaName + '.set', 'dimension2', companyCountry); // Company Country
ga(gaName + '.send', {
hitType: 'event',
eventCategory: 'Albacross',
eventAction: 'DimensionSet'
});
ga(gaName + '.set', 'dimension3', companyFounded); // Company Founded
ga(gaName + '.send', {
hitType: 'event',
eventCategory: 'Albacross',
eventAction: 'DimensionSet'
});
ga(gaName + '.set', 'dimension4', parseInt(companyAlexaRank)); // Company Alexa Rank
ga(gaName + '.send', {
hitType: 'event',
eventCategory: 'Albacross',
eventAction: 'DimensionSet'
});
ga(gaName + '.set', 'dimension5', companyEmployeeMin); // Company Employee Min
ga(gaName + '.send', {
hitType: 'event',
eventCategory: 'Albacross',
eventAction: 'DimensionSet'
});
ga(gaName + '.set', 'dimension6', companyEmployeeMax); // Company Employee Max
ga(gaName + '.send', {
hitType: 'event',
eventCategory: 'Albacross',
eventAction: 'DimensionSet'
});
ga(gaName + '.set', 'dimension7', companyLinkedInCategory); // Company LinkedIn Category
ga(gaName + '.send', {
hitType: 'event',
eventCategory: 'Albacross',
eventAction: 'DimensionSet'
});
ga(gaName + '.set', 'dimension8', companyFinancialsMin); // Company Financials Minimum
ga(gaName + '.send', {
hitType: 'event',
eventCategory: 'Albacross',
eventAction: 'DimensionSet'
});
ga(gaName + '.set', 'dimension9', companyFinancialsMax); // Company Financials Maximum
ga(gaName + '.send', {
hitType: 'event',
eventCategory: 'Albacross',
eventAction: 'DimensionSet'
});
ga(gaName + '.set', 'dimension10', companNACECategory); // Company NACE Category
ga(gaName + '.send', {
hitType: 'event',
eventCategory: 'Albacross',
eventAction: 'DimensionSet'
});
ga(gaName + '.set', 'dimension11', companyCity); // Company City
ga(gaName + '.send', {
hitType: 'event',
eventCategory: 'Albacross',
eventAction: 'DimensionSet'
});
ga(gaName + '.set', 'dimension12', companyState); // Company State
ga(gaName + '.send', {
hitType: 'event',
eventCategory: 'Albacross',
eventAction: 'DimensionSet'
});
ga(gaName + '.send', {
hitType: 'event',
eventCategory: 'Albacross',
eventAction: 'DimensionsSet'
});
} else {
}
} catch (error) {
ga(gaName + '.send', {
hitType: 'event',
eventCategory: 'Albacross',
eventAction: 'Error'
});
}
}
poll();
});
});
Now it's done! 🚀
As soon as you have finished the steps above, Albacross will start enriching your data in Google Analytics to let you create more powerful segmentations and reports.