-
Notifications
You must be signed in to change notification settings - Fork 4
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.
Not what you're looking for? Be sure to use the navigation sidebar on the right. ➡️