Skip to content

deevus/analytics-plugin-posthog

Repository files navigation

PostHog

This library exports the posthog plugin for the analytics package & standalone methods for any project to use to make it easier to interact with PostHog.

This analytics plugin will load PostHog into your application.

Installation

npm install analytics
npm install analytics-plugin-posthog

How to use

import Analytics from "analytics";
import posthog from "analytics-plugin-posthog";

const analytics = Analytics({
  app: "awesome-app",
  plugins: [
    posthog({
      token: "1234", // required
    }),
  ],
});