<aside> ⚠️ Defining and enforcing a naming convention is critical to consistent accurate analytics. If you don’t have one already, we strongly recommend the object-action framework predefined below.
If you use this convention, along with Segment recommended semantic events, Segment will automatically translate events to what various destination expect. For instance, an Order Completed
event will be translated to the purchase
event Facebook expects.
</aside>
We follow Segment's recommended object-action framework naming convention.
For example, here's a full track call for a user signup event.
analytics.track("User Signed Up", { // event names are Object + Action with Proper Case
object: "User",
action: "Signed Up",
category: "User",
email: "[email protected]",
first_name: "Kevin", // property keys are snaked_cased
last_name: "McLaughlin"
});
Use the object-action framework for event names.
This naming convention is simple, easy to implement, extensible, and most importantly, Segment will automatically convert events created with the object-action framework to the event names that the destinations expect. For instance, it will convert Order Created
to the Purchased
event that the Facebook pixel expects.
Examples:
Noun Verb
Checkout Started
Product Viewed
Integration Setup Started