{"id":20313718,"url":"https://github.com/posthog/posthog-plugin-geoip","last_synced_at":"2025-08-21T05:32:23.384Z","repository":{"id":42472218,"uuid":"349481340","full_name":"PostHog/posthog-plugin-geoip","owner":"PostHog","description":"Enrich PostHog events and persons with GeoIP location data","archived":false,"fork":false,"pushed_at":"2024-09-02T08:19:07.000Z","size":215,"stargazers_count":16,"open_issues_count":4,"forks_count":7,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-12-12T19:53:24.971Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PostHog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-19T16:07:00.000Z","updated_at":"2024-11-27T16:00:17.000Z","dependencies_parsed_at":"2024-07-08T10:34:27.066Z","dependency_job_id":"184a2f88-d2ce-4468-928b-f4657e2cbdd4","html_url":"https://github.com/PostHog/posthog-plugin-geoip","commit_stats":{"total_commits":50,"total_committers":6,"mean_commits":8.333333333333334,"dds":0.36,"last_synced_commit":"27e9be02d6914f0f26be3badd88f456e9f4f5a1e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostHog%2Fposthog-plugin-geoip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostHog%2Fposthog-plugin-geoip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostHog%2Fposthog-plugin-geoip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PostHog%2Fposthog-plugin-geoip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PostHog","download_url":"https://codeload.github.com/PostHog/posthog-plugin-geoip/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230494917,"owners_count":18235046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T18:12:29.425Z","updated_at":"2024-12-19T20:07:17.223Z","avatar_url":"https://github.com/PostHog.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostHog Plugin: GeoIP\n\nEnrich PostHog events and persons with IP location data. Simply enable this plugin - from that point on, your new events will have GeoIP data added, allowing you to locate users and run queries based on geographic data.\n\n***Available on Cloud and self-hosted PostHog 1.24.0+***\n\n## IP Address Detection\n\nThis plugin prefers to use event property `$ip` (which should be of type `string`), but if that is not provided,\nit uses the IP address of the client that sent the event.\nThis way in most cases the plugin can infer the IP address without any work on your side.\n\n## Properties\n\nThe following properties can be added to the event if its IP address can be matched to a GeoLite2 City location:\n\n```TypeScript\n$geoip_city_name?: string\n$geoip_country_name?: string\n$geoip_country_code?: string\n$geoip_continent_name?: string\n$geoip_continent_code?: string\n$geoip_latitude?: number\n$geoip_longitude?: number\n$geoip_time_zone?: string\n$geoip_subdivision_1_code?: string\n$geoip_subdivision_1_name?: string\n$geoip_subdivision_2_code?: string\n$geoip_subdivision_2_name?: string\n$geoip_subdivision_3_code?: string\n$geoip_subdivision_3_name?: string\n```\n\nThey are also set on the associated person same as above, plus set_once in `$initial_geoip_...` form, to record where the user was when they were first seen.\n\n\nView of an example event in PostHog:\n\n\u003cimg width=\"708\" alt=\"GeoIP properties in PostHog UI\" src=\"https://user-images.githubusercontent.com/4550621/114558202-bc076600-9c6a-11eb-9c0e-1bd3cc1f3dd7.png\"\u003e\n\n## Caveats\n\nA case to be aware of is sending events from a server – such events, if not provided with custom property `$ip`,\nwill be detected as sent from the location of the data center, instead of the related user.\n\nIf you'd like this plugin to skip over an event and not add the above properties,\nset property `$geoip_disable` to `true` on that event.\n\n## Installation\n\n1. Access PostHog's **Plugins** page from the sidebar.\n1. Go to the **Advanced** tab.\n1. **Fetch and install** the following URL in the **Install from GitHub, GitLab or npm** section:  \n   `http://github.com/PostHog/posthog-plugin-geoip`.\n1. Enable the plugin and watch your events come in with enriched data!\n\n## Questions?\n\n### [Join the PostHo community.](https://posthog.com/questions)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthog%2Fposthog-plugin-geoip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fposthog%2Fposthog-plugin-geoip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthog%2Fposthog-plugin-geoip/lists"}