Custom Events

Track business-specific actions beyond what Overcentric captures automatically.

Tracking Custom Events

Use the trackEvent method to track any action:

overcentric.trackEvent("button_clicked", {
  button_name: "signup",
  page: "/pricing"
});

Reserved Event Names

Overcentric provides reserved event names that power pre-built analytics reports. Use these for common business events:

Event Name Description When to Use
$signup User registration After successful account creation
$login User login After successful authentication
$subscription_purchase New subscription When user starts a paid plan
$subscription_upgrade Plan upgrade When user moves to a higher tier
$subscription_downgrade Plan downgrade When user moves to a lower tier
$subscription_cancel Subscription cancellation When user cancels their subscription

Example: Tracking Signup

overcentric.trackEvent("$signup", {
  plan: "free",
  source: "landing_page"
});

Example: Tracking Subscription

overcentric.trackEvent("$subscription_purchase", {
  plan: "pro",
  billing_cycle: "annual",
  amount: 99
});

Naming Custom Events

For your own custom events, follow these best practices:

  • Use snake_casefeature_used, not featureUsed or Feature Used
  • Be descriptive but concisedocument_exported, not user_clicked_export_button
  • Use consistent naming — Establish patterns across your application
  • Include relevant properties — Add context that helps with analysis

Good Examples

// Feature usage
overcentric.trackEvent("document_created", {
  template: "blank",
  word_count: 0
});

// User action
overcentric.trackEvent("invite_sent", {
  recipient_count: 3,
  role: "editor"
});

// Conversion event
overcentric.trackEvent("trial_started", {
  plan: "pro",
  source: "pricing_page"
});

Event Properties

Properties provide context for your events. You can include any key-value pairs:

overcentric.trackEvent("search_performed", {
  query: "analytics",
  results_count: 15,
  filters_applied: ["date", "category"],
  page: 1
});

Property values can be:

  • Strings
  • Numbers
  • Booleans
  • Arrays
  • Objects (nested)

Next Steps