Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@posthog/maxmind-plugin

Package Overview
Dependencies
Maintainers
5
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@posthog/maxmind-plugin - npm Package Compare versions

Comparing version
0.1.0
to
0.1.1
+1
-1
package.json
{
"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",

@@ -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",

@@ -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!

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 {};