EventProperties
A flexible key-value map for custom event properties.Properties
string | number | boolean | null | undefined
Dynamic properties that can be attached to any event. Keys are strings, and values can be strings, numbers, booleans, null, or undefined.
AnalyticsEvent
The core event structure used internally by the SDK.Properties
string
required
Unique identifier for this event.
number
required
Unix timestamp (in milliseconds) when the event occurred.
string
required
Type of event. Possible values:
track, page, identify, alias, heatmap, session, error, subscription, payment.string
Name of the event (e.g., “Button Clicked”, “Form Submitted”).
EventProperties
Custom properties associated with the event.
string
The identified user ID if available.
string
required
Anonymous identifier for the user, generated automatically if no userId is set.
string
required
Unique identifier for the current session.
object
required
Contextual information about the event:
page(PageProperties): Page-related informationuserAgent(string): Browser user agent stringtimezone(string): User’s timezonelocale(string): User’s localescreen(object): Screen dimensions (width, height)library(object): SDK information (name, version)performance(PerformanceData): Performance metricsheatmap(HeatmapData): Heatmap interaction datasession(SessionData): Session informationerror(ErrorData): Error details
BackendEvent
Backend-compatible event structure for API submission.Properties
string
Unique identifier for the event.
string
required
Type/name of the event being tracked.
string
The user’s ID if they are identified.
string
Current session identifier.
string
ISO 8601 formatted timestamp string.
EventProperties
Custom properties for the event.
string
Browser user agent string (auto-extracted by backend).
string
User’s IP address (auto-extracted by backend).
PageProperties
Properties specific to page view events.Properties
string
Page title from the document.
string
Full URL of the page.
string
URL path (without domain).
string
Referrer URL that led to this page.
string
Query string parameters.
UserProperties
Properties for identifying users.Properties
SubscriptionProperties
User’s subscription information.
string | number | boolean | null | undefined | SubscriptionProperties
Additional custom user properties.
PaymentEventProperties
Extended properties for payment-related events.Properties
number
Payment amount in cents.
string
Currency code (e.g., “usd”, “eur”).
string
Status of the payment. Possible values:
succeeded, failed, pending, refunded.string
Reason for payment failure, if applicable.
string
Associated invoice identifier.
string
Payment processor charge identifier.
ConversionEvent
Event data for A/B test conversions.Properties
string
required
ID of the experiment this conversion is associated with.
string
required
Name of the conversion event.
number
Numeric value associated with the conversion (e.g., revenue).
EventProperties
Additional properties for the conversion event.