Web Analytics - Location (Country, State)

1 - About

Location is a dimension of a visit that can be defined in a hierarchical level as:

  • country
  • state
  • city
  • postal code

3 - Management

3.1 - Ip to Country

The Ip of a visit can be mapped back to the country with a process called geolocalization.

Example with an JQuery ajax to the great https://ip2c.org/ ip to country service.


$.ajax(
	'https://ip2c.org/self',
	{
		success: function (data) {
			console.log("The data that we get from Ip2C: "+data);
			let countryCode = data.split(";")[1];
			let countryDesc = data.split(";")[3];
			console.log('Your country is '+countryDesc+" ("+countryCode+")");
		}
	}
)


Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry

Powered by ComboStrap