Avatar photo

11 Beautiful Event Data Models

One of the most common requests that I get here at Keen is for help with data modeling. After all, you’ve got to collect the right data in order to get any value out of it. Here’s an inventory of common, well-modeled events across a variety of industries:

  1. B2B Saas (create_account, subscribe, payment, use_feature)
  2. E-Commerce (view_item, add_to_cart, purchase)
  3. Gaming (create_user, level_start, level_complete, purchase)

All of the examples are live code samples that you can run and test yourself by clicking “Edit in JSFiddle”.

B2B SaaS Event Data Models

Track what’s happening in your business so that you can make good decisions. With just a handful of key events, you have the foundation for the classic SaaS pirate metrics (AARR: Acquisition, Activation, Revenue, Retention).

Create Account Event (Acquisition)

Capture an event when someone signs up for the first time or creates an account in some other way.

https://jsfiddle.net/7dtm77nc/6/?tabs=js

Subscribe (Acquisition)

Track an event when someone subscribes to your newsletter, chatbot, etc.

https://jsfiddle.net/7dtm77nc/7/?tabs=js

Use Feature (Activation)

It’s really common for product managers and marketers to want to know who is doing what in their products, so they can make roadmap decisions and setup marketing automation. Here’s an example of a event where a feature “Subscribe to SMS alerts” has been done by the user.

By including details about the feature on the event, you can provide yourself a nice dataset for later A/B testing and analysis. (e.g. did changing the button text increase or decrease usage?).

https://jsfiddle.net/3rezjb1h/?tabs=js

Invoice Payment (Revenue & Retention)

This is a simplified example of an invoice payment event. If you use Stripe for payments, you can consume their event firehouse into Keen directly and don’t need to model it yourself.

You can see the full Stripe Invoice object here.

https://jsfiddle.net/ff9y8ppw/3/?tabs=js

Checkout more SaaS analytics uses and applications.

E-commerce Event Data Models

Track what’s happening in your store so that you can maximize sales, marketing investments, and provide detailed analytics to your vendors.

View Item / View Product Event

People checking out your goods? Good. Track it.

https://jsfiddle.net/3rezjb1h/1/?tabs=js

Add Item to Cart

Track every time someone adds a product to their cart, bag, or basket.

https://jsfiddle.net/2wb21enc/?tabs=js

Successful Checkout Event

Track an event every time an order is successfully completed. Use this event to count the total number of orders that happen on your site(s).

Use the Purchase Product Event (below) to track trends in purchases of individual items.

https://jsfiddle.net/7yqkjjsd/1/?tabs=js

Product Purchase Event

Track an individual event for each item purchased. That way you can include lots of rich details about the product and easily run trends on specific products.

https://jsfiddle.net/xxdjmkss/?tabs=js

Gaming Event Data Models

Track what’s important in your game so that you can measure activation, engagement, retention, and purchasing behavior. Checkout this related guide: Data Models & Code Samples for Freemium Gaming Analytics

New Player Event

Track every time a new player starts your game for the first time.

https://jsfiddle.net/p0csfttc/1/?tabs=js

Level Start Event

Track each time a player starts a new level in your game.

https://jsfiddle.net/ndfdeu4s/?tabs=js

Level Complete Event

Track each time a player successfully defeats a level in your game. The data model is the same as level_start, but you’ll have much fewer of these events depending on what type of game you’ve designed.

https://jsfiddle.net/yf96tyny/1/?tabs=js

In-Game Purchase Event

Track when players making purchase in your game you get that $.

https://jsfiddle.net/p0csfttc/1/?tabs=js