Overview

Events are the core of the Intempt data model. All events should have an event name, a timestamp of when that event occurred, and a Master ID (Intempt's identifier for a user) to tie all events belonging to the same user. Events can optionally have a set of attributes that describes the event in more detail.

  • If you're familiar with databases, events are like tables and attributes are like columns.
  • If you're familiar with Google Analytics, events are like hits and attributes are like dimensions.

Examples

  • A Page Viewed event might have an event attribute called Page URL, which is set to the URL of the page that was viewed.
  • A Signed-up event might have an event attribute called Signup Type, which indicates whether the sign-up was organic or a referral.
  • A Song Played event might have an attribute called Song Name, which is set to the name of the song played.
  • A Order Completed event might have an attribute called Items, which is a list of objects, each of which contains details about an item, like its name, category, and price.

Use Cases

You can filter, break, and aggregate your events by their attributes to answer more questions:

  • Which pages do users look at before they visit the pricing page?
  • How many sign-ups did I get that were organic vs referral?
  • Which song name is most popular among my users?
  • How many orders contain shoes? What is the sum total price that users paid for shoes in the last month?

Best Practices

Keep Events as Actions

We recommend striking the right balance when defining your events. Events should neither be too broad nor too specific and should be defined at the level of how you plan to analyze the user's action or behavior. Also, remember that event attributes should be used to provide context or details about an event instead of creating different events to capture similar actions.

For example:

  • If your goal is to analyze at high-level how users move through different pages, instead of tracking multiple events Home Page Viewed and Pricing Page Viewed, track a Page Viewed event with a Page Name attribute set to "/home" or "/pricing". See Tracking Page Views in our Javascript SDK documentation on how to instrument this.
  • If your goal is to track users adding items to a shopping cart: instead of tracking multiple events Add Shirt to Cart, Add Hoodie to Cart, and Add Socks to Cart, track a Add to Cart event with a Item attribute set to "Shirt", or "Hoodie", or "Socks".
  • If your goal is to track 1 button on a specific screen: instead of tracking multiple events Blue Button Clicked and Checkout Button Clicked, track a Button Clicked event with a Color attribute set to "Blue" and Button Name set to "Checkout".
  • If your goal is to track different buttons from different user journeys: instead of tracking 1 event Button Clicked with Button Name attribute set to "Play," "Profile," or "X," track them as different events Song Played and Profile Updated and Logout with specific properties for each event to provide richer context.

Name events and attributes consistently

We recommend having a consistent naming convention for your events and attributes:

Generally, adopting snake_case for your event and attribute names tends to be more robust. Do note that Intempt is case-sensitive (eg sign_up_completed vs Sign Up Completed are considered two separate events).

Use the (Object) (Verb) format for event names. Like song_played or page_viewed.

The Attributes page provides a means for you to change an attribute's display name on the UI (if needed) to make it more user-friendly.