posthog / posthog-plugin-geoip Goto Github PK
View Code? Open in Web Editor NEWEnrich PostHog events and persons with GeoIP location data
License: MIT License
Enrich PostHog events and persons with GeoIP location data
License: MIT License
I was doing some testing in PostHog that involves IP addresses, and noticed that my location was indicated as San Francisco (when it should be New York).
Some events on PostHog also had an IP address that was not my own. (There are at least 2 other IPs besides my own home address). I would also be surprised if these were "hops" on my ISP because I would assume that based on my physical location, I would be connected to a server in N. Virginia or similar.
No proxies or VPNs that I know of are configured on my network.
There is an edge case in which because there's a variable amount of subdivision information for a given IP/country, GeoIP data is stored inconsistently. Given that we only override GeoIP attributes if there are new attributes, consider this very typical flow:
The user will then have a profile that looks like this, which is wrong:
We should probably override all GeoIP attributes when the country/city changes.
I've got segment as a library sending events into PostHog, but not all libraries within segment are created equal and server events are firing with fixed American IP address (we're in Australia), giving me questionable data in PostHog.
I'd like to enable GeoIP for strictly either a fixed set of events, or a sub-library of segment. Maybe if PostHog ingested Segment library as an object then I could enable client, and drop server.
In general this plugin is fantastic but somewhat unusable if half of the sources are getting 'wrong' information.
Due to the GDPR I use the setting "Discard client IP data". However, I am not getting any results from the plugin.
Not sure if it would be possible to discard the client IP after the plugin fetched the geoip?
Would be nice to set these properties on the user as well as on events (at least country/city etc) so you can create cohorts based on location.
It would be great if we can opt-out of GeoIP classification on an as-needed basis. In our use case, we record some events from the browser side (Posthog JS) and some events from our server side (Posthog Ruby). All server-side events end up appearing from Ashburn, Virginia (eg: AWS us-east-1
) and we are unable to prevent the data from being tainted for the Person profiles. I think it would be great if the following could be added:
$geoip_enabled
event property is set to false
$geoip_disable
event property is set to true
.$ip
property and fallback to event.ip
if IP address is not explicitly set.Hi PostHog team,
I am the DevRel of IPinfo, an IP data company. I have some experience with Posthog and tried to implement the feature myself, but I think the scale is just too big.
We have users who have reached out to us about using IPinfo MMDB databases in an analytics platform. The problem is that we do not have any off-the-shelf solutions to support this request. We would like to request that Posthog support the MMDB reader functionality and data update mechanism as a solution for IPinfo.
Our database is in MMDB format and is tabular in nature. While the existing provider's data is unpredictable and nested in nature, our data is tabular with a clear structure. We return an empty string when a value is not present. The MMDB reader library will work perfectly with our data. Additionally, our data can be updated via the storage URI, which accepts the access token as a parameter.
Users requested database support for:
If you can cover only one database, we can reuse the code to write for the rest of our databases.
The documentation of the IP databases is available here:
You can find the sample MMDB databases here: https://github.com/ipinfo/sample-database
Please let me know what you think. Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.