Skip to content

Geolocation

Ricardo Costa edited this page Jul 9, 2020 · 3 revisions

The user's country can be obtained by reading the GU_geo_country cookie, both in PROD and CODE. The value of this cookie will contain the two-letter ISO 3166-1 alpha-2 of the country the user is in.

For implementation details see wiki/Fastly & Caching

If you need to test your code locally you will have to set the cookie yourself. You can do this by running document.cookie="GU_geo_country=<CC>" on your browser's console when accessing your local server, where CC is the country code of the country you want to simulate being in.

Clone this wiki locally