Events that read well
A list of events is the same few words down a column. Put a name or a title on an event and every list in the dashboard says which one it was.
What a list shows
A person's Event timeline and the Live view list events one by one. Twenty screen_view rows say somebody looked at twenty screens and nothing about which. So an event that names what it was shows that after its own name:
screen_view · Checkout
page_view · Pricing
article_read · Why we moved
level_completed · The DocksThe part after the dot is the first of these that holds text:
- the event's
titleproperty; - its
nameproperty; - on a
screen_view, the screen's name — and on apage_view, the page's path.
What reads well already
The events the SDKs send on their own. A screen view carries the name you gave screen(), a web page view carries the document's title, and an app open carries the app's name. If every page of your site has the same document title, pass one to page():
treebars.page('Pricing'); // page_view · PricingYour own events
This is where it is worth a line of code. An event about a particular thing — an article, a product, a level, a plan, a video — should say which, in title or name:
treebars.track('article_read', { title: 'Why we moved', article_id: 'a_481' });
treebars.track('level_completed', { name: 'The Docks', level: 7 });Treebars.track("article_read", properties: ["title": "Why we moved", "article_id": "a_481"])
Treebars.screen("Product", properties: ["title": "Blue Oxford shirt"])Treebars.track("article_read", mapOf("title" to "Why we moved", "article_id" to "a_481"))
Treebars.screen("Product", mapOf("title" to "Blue Oxford shirt"))await treebars.track('level_completed', { name: 'The Docks', level: 7 });
await treebars.screen('Product', { title: 'Blue Oxford shirt' });Which one, and what to put in it
title for something with a headline: an article, a product, a video, a page. name for something with a name: a level, a plan, a playlist, a button. An event with both shows the title. Three habits make them worth reading:
- Words a person would say, not an id. Send the id too, in a property of its own — it is what a filter should match on, because a title gets edited.
- Short. A list cuts it at 60 characters.
- The thing, never the person. Somebody's name or email belongs on their profile, through
identify, not on an event.
title and name are ordinary properties you can filter and break down by like any other.Leaving events out of a list
Some events are worth collecting and not worth reading one by one — a heartbeat, a scroll, the app going to the background. Hidden events, above the Event timeline and the Live view, is a list of your event names: tick the ones you do not want listed. Hide them for yourself, or as an admin for everyone in the project.
A hidden event is still collected, still counted in every report and audience, and still exported. It is only left out of those two lists.