How to get Business Leads Reported in Google Analytics

Through our IP API you can get your business leads reported in Google Analytics, easily and quickly!

We'll give a few options depending your needs.

Choose your option and add the code to your site and you're done. Somewhere in the footer for example. Or add it as Custom HTML in Google Tag Manager.

Lots of traffic? Get the Pro Package so your domain won't get blocked!

Send your Business Leads as Event to Google Analytics:

This option will send all your business leads to Google Analytics as Event. This makes viewing the Business Leads super convenient in the Google Analytics mobile app on the homescreen!

<script>
//If the following doesn't work anymore your website is probably blocked because of usage, get the Pro Package at extreme-ip-lookup.com
function getIPB2B1(json) {
   if (json) {
   	EIPL=json;
   }
   if (EIPL.ipType === 'Business' || EIPL.ipType === 'Education') {
   	if (typeof ga === 'function' && typeof ga.getAll === 'function') {
		var org=''+EIPL.org;
                if (EIPL.businessName) {
                	org=''+EIPL.businessName;
			if (EIPL.businessWebsite) {
				org+=' - '+EIPL.businessWebsite;
			}
		}
		ga(ga.getAll()[0].get('name')+'.send', {
		  hitType: 'event',
		  eventCategory: 'eXTReMe-IP-Lookup.com',
		  eventAction: EIPL.ipType, // sends Business, Education as type of visitor
		  eventLabel: org, // sends the Business/Education name and if available the domain of the Business/Education
		  nonInteraction: true
		});
	}
	else {
		setTimeout(function() {getIPB2B1();}, 200);
	}
   }
 }
</script>
<script src="//extreme-ip-lookup.com/json/?callback=getIPB2B1" async defer></script>

Send all types of visitors as Event to Google Analytics:

Also send the ipType value and you'll be able to seperate/filter/segment your visitors by Business, Education and Residential within Google Analytics.

<script>
//If the following doesn't work anymore your website is probably blocked because of usage, get the Pro Package at extreme-ip-lookup.com
 function getIPB2B2(json) {
   if (json) {
   	EIPL=json;
   }
   if (EIPL.org) {
   	if (typeof ga === 'function' && typeof ga.getAll === 'function') {
		var org=''+EIPL.org;
                if (EIPL.businessName) {
                	org=''+EIPL.businessName;
			if (EIPL.businessWebsite) {
				org+=' - '+EIPL.businessWebsite;
			}
		}
		ga(ga.getAll()[0].get('name')+'.send', {
		  hitType: 'event',
		  eventCategory: 'eXTReMe-IP-Lookup.com',
		  eventAction: EIPL.ipType, // sends Business, Education or Residential as type of visitor
		  eventLabel: org, // sends Service Provider if Residential or the Business/Education name and if available the domain of the Business/Education
		  nonInteraction: true
		});
	}
	else {
		setTimeout(function() {getIPB2B2();}, 200);
	}
   }
 }
</script>
<script src="//extreme-ip-lookup.com/json/?callback=getIPB2B2" async defer></script>

Send your Business Leads as Custom Dimension to Google Analytics:

This requires setup within Google Analytics. Goto Admin > Property > Custom Definitions > Custom Dimensions and click the red '+ NEW CUSTOM DIMENSION' button. Fill in 'Business Leads' for example and choose Session as Scope, click Create then on Done. Remember the Index number of this Custom Dimension. Change the 1 in 'dimension1' in the code below with your Index number. Then add it this code somewhere in your footer or in Google Tag Manager and you're done!

Important, do not forget: Change the 1 in 'dimension1' in the code below with your Index number.

<script>
//If the following doesn't work anymore your website is probably blocked because of usage, get the Pro Package at extreme-ip-lookup.com
 function getIPB2B3(json) {
   if (json) {
   	EIPL=json;
   }
   if (EIPL.ipType === 'Business' || EIPL.ipType === 'Education') {
   	if (typeof ga === 'function' && typeof ga.getAll === 'function') {
		var org=''+EIPL.org;
                if (EIPL.businessName) {
                	org=''+EIPL.businessName;
			if (EIPL.businessWebsite) {
				org+=' - '+EIPL.businessWebsite;
			}
		}
		ga(ga.getAll()[0].get('name')+'.send', {
		  hitType: 'event',
		  dimension1: org,
		  nonInteraction: true
		});
	}
	else {
		setTimeout(function() {getIPB2B3();}, 200);
	}
   }
 }
</script>
<script src="//extreme-ip-lookup.com/json/?callback=getIPB2B3" async defer></script>
Lots of traffic? Get the Pro Package so your domain won't get blocked!