Route traffic by country, state & city using redirects or popups. View Live Demo's ->
November 11, 2019

How to get a visitor's country from IP address?

SE

How to get a visitor's country from IP address?

GT
Answer
by Geo Targetly

To get a visitor's country from their IP address, you will need an IP geolocation API that looks up an IP to location database to provide visitor country data.

Geo Targetly provides both a paid and free IP geolocation API that you can use to get visitor country in your website.

Using this API, you can display a visitor's country in your website content and also carry our advanced site customization using JavaScript variables that hold the country name and country code.

Tags:
visitor, country, IP address

"Hands down one of the best marketing tools you are not using"

Chad T. - Web & Digital Media Director

Get started in minutes
No credit card required
Free on-boarding support
Your Privacy

We uses cookies to improve your experience on our site, analyse site traffic and to show you relevant content. By using our website, you consent to our use of cookies. For more information please, see our Privacy Policy

ACCEPT