Skip to content

Commit 24f5526

Browse files
yosriadyclaude
andcommitted
docs(api): clarify top_locations returns countries only
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent b31505b commit 24f5526

4 files changed

Lines changed: 13 additions & 10 deletions

File tree

api/openapi.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5469,7 +5469,7 @@
54695469
"/v0/top_locations": {
54705470
"get": {
54715471
"operationId": "getAnalyticsTopLocations",
5472-
"summary": "Get top countries / regions / cities",
5472+
"summary": "Get top countries",
54735473
"tags": [
54745474
"Query"
54755475
],
@@ -5493,7 +5493,7 @@
54935493
],
54945494
"responses": {
54955495
"200": {
5496-
"description": "Top locations",
5496+
"description": "Top countries",
54975497
"content": {
54985498
"application/json": {
54995499
"schema": {

api/query/top-locations.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Get Top Locations"
3-
description: "Top countries, regions and cities by visits."
3+
description: "Top countries by visits."
44
openapi: "GET /v0/top_locations"
55
---
66

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`).

cli/analytics.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Requires `query:read` scope on your API key.
3030
| `volume_by_metric` | Trading volume ranked by a metric column |
3131
| `top_chains` | Top chains by activity |
3232
| `top_events` | Top events by count |
33-
| `top_locations` | Top locations |
33+
| `top_locations` | Top countries |
3434
| `top_pages` | Top pages by traffic |
3535
| `top_sources` | Top acquisition sources |
3636
| `top_wallets` | Top wallets by activity |

data/what-we-collect.mdx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ flowchart TD
3737

3838
**What the SDK does NOT send:** IP addresses, third-party cookies, local storage data, device fingerprints, or social profiles.
3939

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.
4141

4242
### What We Do NOT Collect
4343

@@ -132,10 +132,13 @@ We collect device screen and browser viewport dimensions to understand how visit
132132

133133
> We collect and store country of each visitor.
134134
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.
136136

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>
139142

140143
### Language
141144

@@ -229,7 +232,7 @@ You are responsible for ensuring that sensitive data is not collected through fo
229232
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.
230233
</Accordion>
231234
<Accordion title="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.)
233236
</Accordion>
234237
<Accordion title="Does Formo set any cookies?">
235238
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

Comments
 (0)