Get all members location?

(Matthieu) #1


Maybe it is a bit borderline in term of data privacy but I would like to have a map with the country location of our community members, i.e. x in US, y in France, etc …

I know I can do it in the admin panel using the ip lookup but is there a way to do obtain this info for all users easily ? Extract a list or something like this ?


(Régis Hanol) #2

Use Google Analytics? :troll:

(Matthieu) #3

indeed …

I’ve foudn a way to do it. Using the export user database, we can get all IPs. Then using the API we can get the location information.
Finally I’ve created a short script to iterate over the ip list and it’s done.

(Tobias Eigen) #4

Nice! Can you share the recipe and script?

(Sebastian) #5

Or play around the export file with an explorative analytics tool like Maltego

(Matthieu) #6

Of course, you can find the script here:

It outputs a CSV with user per country and per continent.

(Matthieu) #7

Finally I’ve change this work into a discourse members analysis.

Now you can also track the evolution of your community:

Input: the exported Discourse User CSV file
Output: CSV file with members location and evolution overtime.

Still WIP … any help to make it better are welcome :slight_smile: