I have registered the appropriate domain, but the GeoIP2 JavaScript API still isn’t working on my site. What could be causing the request to fail?

As the GeoIP2 JavaScript API runs client-side, it is possible that browser settings and ad-ons (such as Adblock Plus, ublock, and NoScript) may prevent the GeoIP2 JavaScript API from successfully calling the web service.

When using the GeoIP2 JavaScript API, we recommend that you set a default behavior in your system for handling cases where the request may indeed fail. Without a default behavior in place, some examples of the errors you may encounter are “HTTP_ERROR”, “HTTP_TIMEOUT”, “geoip2 is not defined”, or pages that simply fail to complete loading.

To circumvent these potential JavaScript issues, you may possibly consider using one of our GeoIP2 APIs that runs server-side instead as an alternative. Server-side web service requests would not be affected by an end-user’s custom script- or ad-blocking browser settings.