Related pages:

There are some cases where it would be useful to be able to set a specific IP address/location as the origin of the request by modifying the JavaScript Agent itself. Add the following snippet to your page, before you inject the adrum.js script:

    <script type='text/javascript' charset='UTF-8'>
        window['adrum-config'] = (function(config) { 
            config.geo = {
                localIP: "", 
                city: "San Francisco",
                region: "California",
                country: "USA"
            return config;
        })(window['adrum-config'] || {});   
   <script src='//' type='text/javascript' charset='UTF-8'></script>

 You can use this snippet in two ways:

  • Specify only the IP address, in which case this IP address has the highest precedence for use by the geo server, local or cloud-based, in resolving the request location.
  • Specify all of IP, country, region, and city, in which case the request location is set by the script, and is not resolved by the Geo Server.

If you specify only some of the location parameters, the entire configuration is ignored. For example, if you only specified country, but not region, the entire configuration is ignored.

The value for city is only displayed in snapshots and can be any string. Using this value it is possible to specify location more precisely, as desired, for example, San Francisco, Sutter Street.