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.
npm install analytics
npm install analytics-plugin-posthog
import Analytics from "analytics";
import posthog from "analytics-plugin-posthog";
const analytics = Analytics({
app: "awesome-app",
plugins: [
posthog({
token: "1234", // required
}),
],
});