GEO Headers tells your server container where the visitor is, from the visitor's IP address. You can send the country, region or city to analytics and ad platforms, or use it in rules, for example to ask for consent only in some countries. It works on every plan. No outside service is called: FlyNode looks the address up in its own IP database.
What you get
| Value | Example |
|---|---|
| Country code | FR |
| Country name | France |
| Region | Ile-de-France |
| City | Paris |
| Postal code | Only when the data has it (see below) |
| IP address | The address that was looked up |
| Latitude, longitude | The middle of the city or area, not the visitor's home |
Set it up
- Open your container, go to Power-Ups and turn on GEO Headers. Your container restarts once.
- Download the FlyNode Geo template from the power-up. In your server container open Templates, Variable Templates, New, the three-dot menu, Import.
- Create a variable of that type. In Return pick the value (country code, city and so on). Make one variable for each value you need.
- Use the variables in your tags, for example as event parameters (
country,city) or user properties.
FlyNode sends the address of its lookup with every request, so there is nothing else to type. The variable asks it once per IP address and remembers the answer for an hour (you can change that in the template).
Test it
- Open the server container in Preview and send a request from your site.
- Open the request, go to Variables and look at your Geo variables. You see the values for your own address.
Use it: consent by region
- Make a Geo variable that returns the country code.
- In your server container add a trigger or a tag exception: for example fire the marketing tags only when the country is not in the list of countries that need consent, or when consent was given.
- For the browser side, send the same country (you can read it from a server-side response) or use your consent tool's regional rules.
Good to know
- The location is from the IP address: country is very accurate, city much less so. Mobile networks, VPNs and company networks show where the network exits, not always where the person is.
- If an address cannot be placed (a private address, for example) the variable returns nothing and your tags still fire.
- The free DB-IP data has no postal codes. FlyNode can use MaxMind GeoLite2, which has some, when the platform is set up with a MaxMind account. The power-up shows which one is in use.
- Turning the power-up on or off restarts the container once.
Data: IP Geolocation by DB-IP, or, when GeoLite2 is in use: this product includes GeoLite2 data created by MaxMind, available from https://www.maxmind.com.
Still stuck?
Open a support ticket from your dashboard and include the container name.