Skip to content
Gravity Logo / Docs Gravity home
Browse documentation
Documentation/Gravity Web

Events

There’s no need to deploy expensive third-party analytics tools to track user behaviour in Gravity as it comes with client-side event tracking and analytics built in.

Track Events

Call the Event function with a name and optional metadata. Set STORE_EVENT_LOGS=true on the server to persist events.

import { Event } from 'components/lib';

Event({ name: 'upgrade', metadata: { plan: 'Unicorn' } });

Standard Events

The following events are already configured for you:

  • signin
  • selected_plan
  • cancelled_onboarding
  • upgraded
  • invited_user
  • closed_account

Event Analytics

You can get a birds eye view of all of your event data in Mission Control. Here you can see:

  • the total number of triggers for each event
  • events charted over time
  • a list of all events
  • individual event detail

Info

Need to see events by a specific user? Search for their email address in the event listing page.