To go through these in turn:
With these grammatical building blocks defined, let’s now put them through their paces modelling some digital events - starting with some online retail events:
Here are some ecommerce events mapped to our grammatical model:
In this event, a shopper (Subject) views (Verb) a t-shirt (Direct Object) while browsing an online store (Context).
Here we introduce an Indirect Object which has been affected by the event: the shopper (Subject) adds (Verb) a t-shirt (Direct Object) to her shopping basket (Indirect Object). Again, this is while browsing the online store (Context).
Here we have an Object introduced by preposition: the shopper (Subject) pays (Verb) for his order (Prepositional Object). This is all within the checkout flow (Context).
So far so good, but how well does this model work with events generated by a gaming session?
In a gifting screen within the game (Context), the player (Subject) gifts (Verb) some gold (Direct Object) to another player (Indirect Object).
During a two-player skirmish (Context), the first player (Subject) kills (Verb) the second player (Direct Object) using a nailgun (Prepositional Object). This illustrates how your end-users can be the Object of events, not just their Subjects.
Here we illustrate a reflexive verb: through grinding (Context), the player (Subject) levels herself up (Verb, reflexive). A reflexive Verb is one where the Subject and the Object are the same.
This seems to be working well! Finally, let’s map our new event grammar onto the world of digital media and publishing:
While consuming media on your site (Context), a user (Subject) reads (Verb) an article (Direct Object).
Wanting to share content socially (Context), a user (Subject) shares (Verb) a video (Direct Object) on Twitter (Prepositional Object). Also note that Twitter here is a proper noun (not a common noun).
Working from the moderation UI (Context), an administrator (Subject) bans (Verb) user #23 (Direct Object). This illustrates how an end-user can be the Object of an event, and how someone other than an end-user can be the Subject of the event.
As you can see, it is relatively straightforward to map any of the digital events above into these six “slots” of: Subject, Verb, Object, Indirect Object, Prepositional Object and Context. This is unsurprising: our core grammar has been unambiguously describing events in many different human languages across thousands of years.
Going through the above exercise, several further things have become clear to us that we will want to factor into the Snowplow event grammar going forwards:
Most web and event analytics systems make the mistake of making the Subject of the event implicit:
(End user) adds product to basket (Admin) bans user #23
This is a mistake, because as we have seen above, expressing the Subject is a key component of our event grammar.
Going further, it is particularly dangerous to assume that the Subject of every event is your end-user or customer, because we have seen cases where this is not the case.
As per these gaming examples:
User #1 gifts gold to user #2 User #2 kills user #3 User #2 levels up Admin bans user #1
As we can see from this, the same entities will be found as Subject, Direct Object, Indirect Object or Prepositional Object depending on the event.
Most analytics systems miss the fact that an end-user (for example) is not merely the implicit Subject of multiple events, but is in fact an entity which is the Subject and the Object of different events.
All of the events above were modelled simply using verbs in the active voice, not the passive voice:
We don’t need to use passive voice for our event model, because we can always derive (if needed) a passive voice event from our active voice event.
Going further, Verbs conjugate in lots of other ways (tense, person, mood etc) - but again we don’t need to include any of this into our event model: all of this can be derived (if needed) from our event’s Context.
Our idea of Context does not map cleanly onto a singular grammatical component, but it is just too useful to exclude. In fact, de facto we already have a rich web context for Snowplow events in our Canonical event model, including:
We hope this has been an interesting exploration of how we can potentially adapt and simplify the grammar of human languages to express a new grammar for digital events. We are really excited about the possibilities this opens up - initially around expressing such a grammar in our new Avro event model, and later hopefully in graph databases such as Neo4J.
Of course, we have only just started to sketch out this new event model, and we hope that it will prompt a wider debate with the Snowplow and analytics communities. We are excited to evolve these ideas and build a model for universal event analytics with you, together - and we look forward to continuing the conversation on our snowplow-user mailing list.
And finally, many thanks again to Loic Dias Da Silva for sharing his original Actor-Action-Object idea on our blog!