@posthog/maxmind-plugin
Advanced tools
+1
-1
| { | ||
| "name": "@posthog/maxmind-plugin", | ||
| "version": "0.1.0", | ||
| "version": "0.1.1", | ||
| "description": "Ingest GeoIP data via MaxMind databases", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
+5
-1
@@ -8,4 +8,8 @@ { | ||
| { | ||
| "key": "maxmindMmdbDescription", | ||
| "markdown": "Sign up for a [MaxMind.com](https://www.maxmind.com) account, download and extract the database and then upload the extracted `.mmdb` file below.\n\nYou can either download the large city databases (GeoIP2 City or GeoLite2 City) or the smaller country databases (e.g. GeoLite2 Country).\n\nSome PostHog installations might have problems loading the huge (70+MB) city databases, so unless you really need the additional data, we recommend installing the smaller (3MB) country database instead.", | ||
| "name": "How to obtain a GeoIP database?" | ||
| }, | ||
| { | ||
| "key": "maxmindMmdb", | ||
| "markdown": "Sign up for a [MaxMind.com](https://www.maxmind.com) account, download and extract the database and then upload the extracted `.mmdb` file below.\n\nYou can either download the large city databases (GeoIP2 City or GeoLite2 City) or the smaller country databases (e.g. GeoLite2 Country).\n\nSome PostHog installations might have problems loading the huge (70+MB) city databases, so unless you really need the additional data, we recommend installing the smaller (3MB) country database instead.", | ||
| "name": "GeoIP .mddb database", | ||
@@ -12,0 +16,0 @@ "type": "attachment", |
+2
-2
@@ -8,5 +8,5 @@ # PostHog MaxMind Plugin | ||
| 1. Visit the _Plugins_ page in PostHog ('Settings' -> 'Project Plugins') | ||
| 1. Click '+ Install new plugin' and use this URL to install: `http://www.npmjs.com/package/posthog-maxmind-plugin` | ||
| 1. Click '+ Install new plugin' and use this URL to install: `http://www.npmjs.com/package/@posthog/maxmind-plugin` | ||
| 1. [Sign up to MaxMind](https://dev.maxmind.com/geoip/geoip2/geolite2/) | ||
| 1. Download the GeoLite2 City (or the paid GeoIP City) database | ||
| 1. Download the GeoLite2 City or Country (or the paid GeoIP City or Country) database | ||
| 1. Upload the `.mmdb` file in the archive via the plugin interface | ||
@@ -13,0 +13,0 @@ 1. Enable the plugin and watch your events come in with the enriched data! |
| export {}; |
| import Reader, { Response } from 'mmdb-lib'; | ||
| import { PluginMeta, PluginEvent, PluginAttachment } from '@posthog/plugin-scaffold'; | ||
| interface Meta extends PluginMeta { | ||
| config: { | ||
| localhostIP: string; | ||
| }; | ||
| attachments: { | ||
| maxmindMmdb?: PluginAttachment; | ||
| }; | ||
| global: { | ||
| ipLookup?: Reader<Response>; | ||
| }; | ||
| } | ||
| export declare function setupPlugin({ attachments, global }: Meta): Promise<void>; | ||
| export declare function processEvent(event: PluginEvent, { global, config }: Meta): PluginEvent; | ||
| export {}; |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
202428
-0.21%17
-10.53%3236
-0.4%1
Infinity%