SDKs
Event Types
Pre-defined, type-safe event constants for analytics tracking
Overview
Usercanal provides standardized event names and type-safe constants for common business metrics. Using these predefined events instead of custom string literals helps:
- Maintain consistency across your development team by preventing variations in event naming (e.g., "purchase" vs "subscription")
- Enables automatic setup of common analytics views like funnels and revenue metrics in usercanal dashboard
- Reduce implementation errors through type checking
- Leverage built-in functionality - standard events like
UserSignedUp
automatically integrate with Usercanal's analytics features
These type definitions work together with your SDK's tracking methods. While Track()
allows flexible event tracking with custom properties, specialized methods like Revenue()
enforce proper parameter structure for financial events. Refer to your SDK's documentation for detailed implementation guidelines and best practices for each event type.
Authentication & User Management
Constant | Value | Description |
---|---|---|
AuthMethodPassword | "password" | Password-based authentication |
AuthMethodGoogle | "google" | Google OAuth |
AuthMethodGitHub | "github" | GitHub OAuth |
AuthMethodSSO | "sso" | Single Sign-On |
UserSignedUp | "User Signed Up" | New user registration |
UserSignedIn | "User Signed In" | User login |
UserSignedOut | "User Signed Out" | User logout |
UserInvited | "User Invited" | User invitation sent |
UserOnboarded | "User Onboarded" | Completed onboarding |
AuthenticationFailed | "Authentication Failed" | Failed login attempt |
PasswordReset | "Password Reset" | Password reset request |
TwoFactorEnabled | "Two Factor Enabled" | 2FA enabled |
TwoFactorDisabled | "Two Factor Disabled" | 2FA disabled |
Revenue & Billing
Constant | Value | Description |
---|---|---|
RevenueTypeOneTime | "one_time" | One-time purchase |
RevenueTypeSubscription | "subscription" | Recurring subscription |
CurrencyUSD | "USD" | US Dollar |
CurrencyEUR | "EUR" | Euro |
CurrencyGBP | "GBP" | British Pound |
PaymentMethodCard | "card" | Credit/Debit card |
PaymentMethodPayPal | "paypal" | PayPal |
PaymentMethodWire | "wire" | Wire transfer |
OrderCompleted | "Order Completed" | Purchase completed |
OrderRefunded | "Order Refunded" | Order refunded |
OrderCanceled | "Order Canceled" | Order canceled |
PaymentFailed | "Payment Failed" | Payment failure |
PaymentMethodAdded | "Payment Method Added" | New payment method |
PaymentMethodUpdated | "Payment Method Updated" | Updated payment details |
PaymentMethodRemoved | "Payment Method Removed" | Removed payment method |
Subscription Management
Constant | Value | Description |
---|---|---|
SubscriptionStarted | "Subscription Started" | New subscription |
SubscriptionRenewed | "Subscription Renewed" | Successful renewal |
SubscriptionPaused | "Subscription Paused" | Temporary pause |
SubscriptionResumed | "Subscription Resumed" | Resumed after pause |
SubscriptionChanged | "Subscription Changed" | Plan/tier change |
SubscriptionCanceled | "Subscription Canceled" | Subscription ended |
Trial & Conversion
Constant | Value | Description |
---|---|---|
TrialStarted | "Trial Started" | Trial period began |
TrialEndingSoon | "Trial Ending Soon" | Trial near completion |
TrialEnded | "Trial Ended" | Trial period ended |
TrialConverted | "Trial Converted" | Converted to paid |
Shopping Experience
Constant | Value | Description |
---|---|---|
CartViewed | "Cart Viewed" | Cart page visited |
CartUpdated | "Cart Updated" | Cart items modified |
CartAbandoned | "Cart Abandoned" | Cart left without purchase |
CheckoutStarted | "Checkout Started" | Began checkout process |
CheckoutCompleted | "Checkout Completed" | Completed purchase |
Product Engagement
Constant | Value | Description |
---|---|---|
PageViewed | "Page Viewed" | Page navigation |
FeatureUsed | "Feature Used" | Feature interaction |
SearchPerformed | "Search Performed" | Search action |
FileUploaded | "File Uploaded" | File upload |
NotificationSent | "Notification Sent" | Notification delivered |
NotificationClicked | "Notification Clicked" | Notification interaction |
Communication
Constant | Value | Description |
---|---|---|
EmailSent | "Email Sent" | Email delivered |
EmailOpened | "Email Opened" | Email viewed |
EmailClicked | "Email Clicked" | Email link clicked |
EmailBounced | "Email Bounced" | Failed delivery |
EmailUnsubscribed | "Email Unsubscribed" | Opt-out |
SupportTicketCreated | "Support Ticket Created" | New support request |
SupportTicketResolved | "Support Ticket Resolved" | Ticket closed |