Skip to main content

Event-based Tribes Feature

· 2 min read
Chris Palmer

Recently we released event-based Tribes, allowing operators to segment their audience by the events which they have performed. This opens up more targeting possiblities including the ability to respond to user interaction in real-time.

To get the most out of event-based Tribes, we needed to update a few aspects of our SDKs. Specifically we've introduced two new features:

  1. Global Events
  2. Event Metadata

Continue reading to learn how these features can help you get the most out of event-based Tribes.

Global Events#

The SDK has always offerred the ability to track events as users perform various actions. However the SDK only allowed events to be tracked at the Experience level. For customers who weren't using MTRIBES for targeting, this posed a limitation.

import { collections } from "./src/mtspace/example";
// requires an experience to track "item/clicked"let bannerExperience = collections.home.banner;bannerExperience.track("item/clicked");

To overcome this limitation we've introduced Global Events so that events can be tracked outside of an Experience. This can be done by calling Session.track() directly, without needing an Experience first.

import { session } from "./src/mtspace/example";
// ONLY requires the session to track "item/clicked"session.track("item/clicked");

This will hopefully mean a simpler setup for customers who don't require Experiences (i.e. no need to create a container Experience just to track events). For customers who are using Experiences, there is no change and everything will continue to work as normal.

Event Metadata#

The SDK enabled developers to track custom event types, however developers weren't able to provide any contextual information along with the event. For example, if you wanted to track a movie/watched event, you might want to include the title, or the genre of that movie.

videoplayer.track("movie/watched");// title ??// genre ??

To address this limitation of the SDK, we introduced Event Metadata which allows developers to provide 3 metadata pairs when tracking an event:

videoplayer.track("movie/watched", {  pair1: {    key: "title",    value: "Parasite"  },  pair2: {    key: "genre",    value: "Comedy Thriller"  },  pair3: {    key: "language",    value: "Korean"  }});

Event Metadata is particularly useful for event-based Tribes, because events can be filtered by their metadata when building a Tribe. This gives operators more granular control over which events they select for an event-based Tribe.