Usage
To capture product events, you can use theanalytics object exported from the @repo/analytics package.
Start by importing the analytics object for the relevant environment:
capture method to send events:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Captures product events and metrics.
analytics object exported from the @repo/analytics package.
Start by importing the analytics object for the relevant environment:
// For server-side code
import { analytics } from '@repo/analytics/posthog/server';
// For client-side code
import { analytics } from '@repo/analytics/posthog/client';
capture method to send events:
analytics.capture({
event: 'Product Purchased',
distinctId: 'user_123',
});