user_signup_clicked is a user event, about the signup, that was clicked. The form
makes events sort by domain in the dashboard and easy to filter in a query.
Categories
The category is the domain of the event. Pick the most specific one that fits.
If no category fits, extend the closest one with a specific object:
user_referral_link_copied,
cart_wishlist_moved. For a one-off case, a plain descriptive name is acceptable:
easter_egg_discovered.
Actions
The action is a verb in the past tense.Examples
A checkout flow, with context in properties and not in the name.Template events and system events
Template events are the events behindtrackLogin, trackSignup, trackPurchase,
trackCheckout, trackSearch, trackAddToCart, and trackRemoveFromCart. Their names are
login, signup, purchase, checkout, search, add_to_cart, and remove_from_cart. Do
not rename them. The dashboard reads them by these names. Read
Template events.
System events start with _grain_. The SDK sends them on its own: _grain_session_start,
_grain_session_end, _grain_heartbeat, _grain_consent_granted.
Names in queries
GET /events/{tenantAlias} on the Query API returns every event name in your tenant, sorted.
With the convention, the list groups by category on its own: every cart_ event, then every
checkout_ event, then every user_ event. A funnel is a list of names in order, for example
product_details_viewed, cart_item_added, cart_checkout_started, checkout_completed.
Read Export and query data.
Limits
When a name is too long, shorten the object:
checkout_address_autocomplete_selected instead of
checkout_shipping_address_autocomplete_selected.
Migrate existing names
The SDK accepts any event name, so old names keep working. Migrate at the pace that fits your codebase.Checklist
Before you track a new custom event, make sure that:- The name has the form
{category}_{object}_{action}. - The category is in the table above, or extends one.
- The action is a standard verb in the past tense.
- The name is 50 characters or fewer.
- The name is not a template event name and does not start with
_grain_. - The name holds no ID, timestamp, or other data. Data goes in properties.
- The name uses the same style as every other event in the application.
- A colleague can understand the name without context.