’s Geotargeting Service


Autopopulating our country dropdown list with the correct country

An Inbound Now customer has asked to be able to automatically set his country select dropdown to the correct country when a visitor accesses his signup page. To get this done we are using the ip lookup service, who provides us with enough free lookup calls to handle the traffic this this customer’s website will see.

To implement this solution we used WordPress standards to implement the remote javascript file provided by and then another WordPress hook to use that data to set our dropdown to the correct country code.

Here’s an example of what the final modification looked like in our customer’s theme’s functions.php file:

For more information on how to use the geolocation powers of’s javascript insert please see this documentation resource:

(Visited 459 time, 90 visit today)