You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: "Top countries, regions and cities by visits."
3
+
description: "Top countries by visits."
4
4
openapi: "GET /v0/top_locations"
5
5
---
6
6
7
-
Returns the top geographic locations of visitors over the selected window.
7
+
Returns the top countries of visitors over the selected window. The `location` field is an ISO 3166-1 alpha-2 country code (for example, `US`, `GB`, `DE`).
Copy file name to clipboardExpand all lines: data/what-we-collect.mdx
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ flowchart TD
37
37
38
38
**What the SDK does NOT send:** IP addresses, third-party cookies, local storage data, device fingerprints, or social profiles.
39
39
40
-
**What happens server-side:** The server receives the IP address via standard HTTP headers (this is true for any HTTP request to any server, including GA4 and Umami). Formo uses the IP address only to compute a daily-rotating session hash for session counting, then discards it. The raw IP address is never stored in logs or databases.
40
+
**What happens server-side:** The server receives the IP address via standard HTTP headers (this is true for any HTTP request to any server, including GA4 and Umami). Formo uses the IP address only to compute a daily-rotating session hash for session counting, then discards it. The raw IP address is never stored in logs or databases. Separately, the network edge resolves the IP to a country code (see [Country](#country)) and passes only that code to Formo; the IP itself never reaches our servers for this purpose.
41
41
42
42
### What We Do NOT Collect
43
43
@@ -132,10 +132,13 @@ We collect device screen and browser viewport dimensions to understand how visit
132
132
133
133
> We collect and store country of each visitor.
134
134
135
-
We collect visitor country based on their time zone, not their IP address.
135
+
We resolve visitor country server-side at the network edge, the same approach used by analytics tools like Google Analytics, Plausible, and OpenPanel. The edge performs an IP lookup and passes only the resolved ISO 3166-1 alpha-2 country code (for example, `US`, `GB`, `DE`) to Formo. The raw IP address never reaches our servers and is never stored.
136
136
137
-
Every country has their own time zone and modern devices automatically update the time zone when the device travels.
138
-
The time zone is limited to a country, so we can't get data about a city or region within a country.
137
+
Country is the only geographic granularity we collect: we do not derive or store region or city. Where the edge cannot resolve a country, the value falls back to `unknown`.
138
+
139
+
<Note>
140
+
Previously, country was inferred from the browser timezone (`Intl.DateTimeFormat().resolvedOptions().timeZone`) on the client side. Edge-based geolocation is more accurate because a single timezone can span multiple countries (for example, the UTC+7 band covers both Thailand and Vietnam). For events sent from a server-side SDK (`server`, `api`, or `import` channels), the location provided by the SDK is preserved, since the request IP belongs to your backend rather than the end user.
141
+
</Note>
139
142
140
143
### Language
141
144
@@ -229,7 +232,7 @@ You are responsible for ensuring that sensitive data is not collected through fo
229
232
The classification of wallet addresses under GDPR depends on context. Formo treats wallet addresses as pseudonymous identifiers - they are not linked to names, emails, or IP addresses in our system. We recommend consulting your legal counsel for guidance specific to your jurisdiction and use case.
230
233
</Accordion>
231
234
<Accordiontitle="How does Formo determine a visitor's country without storing IP addresses?">
232
-
Formo derives the visitor's country from the browser's timezone (`Intl.DateTimeFormat().resolvedOptions().timeZone`) on the client side. This maps a timezone to a country code without using IP geolocation. The raw IP address is never stored.
235
+
Formo resolves the visitor's country server-side at the network edge, which performs an IP lookup and passes only the resolved ISO 3166-1 alpha-2 country code to our servers. The raw IP address never reaches Formo and is never stored. We collect country only: never region or city. (Earlier versions inferred country from the browser timezone on the client side; edge geolocation replaced this because a single timezone can span multiple countries.)
233
236
</Accordion>
234
237
<Accordiontitle="Does Formo set any cookies?">
235
238
Formo uses first-party cookies for anonymous visitor identification and cross-subdomain tracking (e.g., an `anonymous-id` cookie and session cookies). These are first-party cookies scoped to your domain only - Formo does **not** set any third-party cookies or cross-site tracking cookies. Because Formo does not use third-party cookies, most jurisdictions do not require a cookie consent banner, but consult your legal counsel for your specific case.
0 commit comments