What Should I Name My Events?

It's essential that you plan a consistent naming convention for your events to help your team understand them. Regardless of the syntax you choose, the most important factor is that all events consistently follow your chosen syntax. Some best practices for naming and organizing events include:

1. Use a standard naming pattern for creating events. We recommend using the Noun + Verb + Object structure, as used in the following example:

  • Example: 'Checkout: Submit Order'

2. Choose a standard tense (either past or present) for your event names. For example, if you use present tense, you'll want to name your event 'Start Checkout' instead of 'Started Checkout' (past tense).

3. Use a regular capitalization pattern. Some teams prefer sentence case, some prefer title case, nobody prefers all caps. For example, you'll probably want all your events to be have either the format 'Signed Up', 'Signed up', or 'signed up'. Not mixed. Whatever it is, choose one and stick with it. We recommend Title Case since it's more readable.

How Should I Name My Events?

A clear and consistent nomenclature is critical to the success of your event taxonomy and the utility of your data. Clear event names are descriptive and denote what is occurring. We recommend an verb + object syntax for clarity. For example:

  • Example: 'Submit Shipping Address'

  • Example: 'Submit Order'

  • Example: 'Land on Order Success Page'

You can also prefix your event names with a category (noun). Structuring you events this way makes it to search and enhances your discoverability. If a colleague doesnโ€™t know what events are in the checkout process, they can simply type โ€œcheckoutโ€ in your analytics or marketing tools and see every event that falls under that category.

  • Example: 'Checkout: Submit Shipping Address'

  • Example: 'Checkout: Submit Order'

  • Example: 'Checkout: Land on Order Success Page'

Autotrack Events Are Not Tied To Code

In other tools, once instrumented the name of an event can never be changed in the raw data.

With Freshpaint, event names are abstracted away from code. If you make any mistakes or want to change your naming convention, that's okay. You can always edit an event and backfill the data into your destinations (this might cause additional event volume in your destination, which may affect pricing).

Naming Precision Tracking Events

The Precision Tracking source is provided by the Freshpaint SDK and is an alternative to the Autotrack source that lets you track your events with code. You can read more about Precision Tracking here.

Precision Tracking events will be written by your developers in your code. If you have multiple environments, it is essential that the events are named _exactly _ the same across all environments in order to avoid duplication of these events in your Event Library. This includes cases and leading/trailing spaces.

If your developers would like to send test events from development or staging environments and would like to be able to differentiate those test events from those same events in production in the event library, we would recommend the developers including the name of the testing environment in the Precision Tracking event name. Any user can then easily differentiate events coming from test environments and hide them in the Event Library if desired.

Need Help?

It may seem a little pedantic, but when you have dozens or hundreds of events you'll want maximum consistency. Feel free to drop us a line at support@freshpaint.io if you have questions on how to best apply these conventions to your organizations.

Last updated