koko-analytics
koko-analytics copied to clipboard
Feature suggestion: show visitor locations
Is there a privacy friendly way of determining the visitor location (besides browser language), and if so, could this be implemented in Koko?
https://wordpress.org/support/topic/would-love-to-see-visitor-location/
Please vote on this feature suggestion using :+1: or :-1: below.
Would be useful to have this 👍🏼
As mentioned in WordPress support topic, detecting the country would be based on IP, but in many cases this piece of info is already present in page requests.
For inspiration, you can check here https://github.com/AndreiIgna/if-menu/blob/master/src/user-info.php#L32 how the location is detected quicker, with a final callback on database/api.
What would you do with the data? How does it benefit you? I love Koko just because of the privacy-first approach. I don't need location data or any personal data for that matter.
Probably each site owner has different uses for this.
When a site/blog/shop wants to attract people from a specific country, it's good to take a look at this metric and see that everything goes towards the goal.
Privacy-first is a big reason I installed Koko Analytics on a few websites, and for sure location metric can be implemented without compromising it.
IP or other personal data doesn't need to be recorded, and having stats like: US - 100, UK - 30, ES - 10, etc
is no different than April - 100, May - 90, Jun - 100, etc
for affecting privacy or exposing personal data about visitors.
https://wordpress.org/support/topic/suggestion-290/
https://wordpress.org/support/topic/extra-visitor-data/
Agree, this would be great! I'd also like to see an option for Cloudflare users to be able to get this from the CF geolocation header. This would avoid needing to use something like MaxMind and would be super lightweight:
https://support.cloudflare.com/hc/en-us/articles/200168236-Configuring-Cloudflare-IP-Geolocation
@dannyvankooten Hey Danny, is something you're planning on adding? Just wondering, because this feature request had been open for over 12 months. We're tossing up between plausible.io and Koko at the moment. Location stats are important for us because we're running a global e-comm store. We'd prefer to not need an additional VPS for stats so Koko would be ideal :) If not, we'll spin up a small VPS for a Plausible install.
Cheers
I am all for privacy and keeping it simple in terms of GDPR (et al). But a corse location is something I'd love to see:
If I know which country my visitors are from, I can provide them appropriate content taking cultural aspects into account.
E.g. if I have lots of visitors from India on my blog, I might schedule a blog for Diwali, if I have lot of people from the US, I might do the same for Thanksgiving...
I vote for that!
Mark me down for a yes vote on this.
Plausible might have some relevant information on how to collect locations without compromising privacy
https://github.com/plausible/analytics/discussions/102#discussioncomment-1899120
We've been testing a few different geolocation databases over the last few months and settled on https://db-ip.com/.
I think, on the first go, we could be aiming for the country only – as far as I can remember, the rather popular MaxMind GeoIP database can solve that out of the box for us.
The bulk of the questions that most of the admins and content creators need an answer to can be answered by that:
- Where to put some CDNs in place?
- Generally which culture are my visitors from – should I do a sale for Black Friday or Christmas or Diwali?
- What cultural references will they get?
And ~~knowing~~ counting someone's country is, probably fine by GDPR – although I am no lawyer.
If we can have that MVP, that'd be wonderful.
Then we might think about further improvements – perhaps we can go to the county/state level, without worrying about the privacy?
But then again, the city level is always tricky: SoHo and King's Cross being replaced by London is privacy preserving, as London has some 8+ million people.
But then again, looking at the UK specific examples from the link (other countries are broadly similar, I imagine):
- London W1 (Soho+Mayfair+Marylebone+Fizrovia) is about 25k, which is on par with Chichester (both 2001 figures) – is that still privacy-respecting? (See https://www.bealondoner.com/en/areas/soho and https://en.wikipedia.org/wiki/List_of_smallest_cities_in_the_United_Kingdom)
- The City of London is 7k – how about this?
- On the Wikipedia list there are settlements with a few thousands of people; is that OK form a GDPR standpoint?
- Also, these are only the settlements with official city status. What about small towns; there a probably plenty of those in the UK.
What I am trying to say, that it's rather hard to draw the line and it'd be a tricky legal and technical question – so perhaps we can split this into an MVP with countries and then see how much farther we can (or allowed to) go...