← Stories

How We Know Which Country Clicked Without Storing Your IP

By Rehan Sayyed, SRT Corporates · Published

Every click on Click With The World is credited to a country. The leaderboard depends on it. Yet the site has no accounts, never asks where you are, and does not store your IP address. This is how those fit together.

Step one: our host already has a rough idea

Every request on the web arrives from an IP address. That is how the reply finds its way back to you.

Our hosting provider, Vercel, looks up the country associated with that address and attaches it to the request as a two-letter code, such as IN, BR or DE. Our page calls a very small function of ours that reads that one code and hands it back. The function reads nothing else, calls no outside service and saves nothing.

Vercel can estimate more than the country from the same address: region, city, postal code, even latitude and longitude. We read none of those. The country is the only thing a country leaderboard needs.

Step two: a fallback, only when needed

Occasionally Vercel has no country to offer. In that case a fallback service, ipwho.is, is asked instead. It receives your IP address, as any site you contact does, and returns a country code. We use only the code.

This fallback runs on the Home page and in the embeddable widget, where clicks happen. The Leaderboard page uses step one only. If that finds nothing, the "Your Country" card simply stays hidden.

Once per visit

The lookup happens once per visit, not once per click.

What a click actually saves

When you click, the click is credited to that country code. The database records:

The Live Clicks list holds six entries. Each new click overwrites the oldest, so no history of individual clicks builds up.

What is not saved: your IP address, your name, your email, your city, or anything that describes your device.

When it gets the country wrong

Finding a country from an IP address is an estimate. It is usually right, but not always:

There is no country picker, so this cannot be corrected by hand. That is deliberate. The leaderboard is meant to show where clicks come from, not which flag people would choose.

When there is no country at all

If neither step finds a country, the click still counts. It adds to the world total and to today's total, but it is not added to any country's row, and the Live Clicks list shows it as a click with no country named.

This is also why the percentages on the leaderboard can add up to slightly less than 100.

Who still sees your IP address

Not storing an address is different from never receiving one. An IP address is part of every connection, so:

What we do is leave it out of our own data. The full list of services is in the Privacy Policy.

Why not ask the browser for your location?

Browsers can share a precise location if you grant permission. We don't ask. A country worked out from the connection is coarse on purpose, and it needs no permission prompt.

Source