Hi Guys,
We are embarking on our Snowplow journey and as we begin to derive our schema structure, we were hoping to utilise some of the vast experience on this channel - in terms of what has or hasn’t worked!
From our perspective, the optimal solution would be for us to build schemas comprised solely of contexts [with no data attached to the events themselves] as this would be the cleanest solution.
An example of this can be found in Snowplow documentation here
However, we recognise that if we opt for entities within self-describing events, then the event schema would be essentially blank.
The Snowplow documentation expresses “We recommend using Self Describing events whenever possible as they give more control and semantic meaning to your data tracking.” If the majority of our events use only entities with no data attached, would Self Describing events remain the best event type in our case?
Example:
A basket add event may comprise solely of basket and product contexts - therefore the basket_add schema “iglu:com.example/basket_add/jsonschema/1-0-0” would be blank.
window.snowplow('trackSelfDescribingEvent', {
"event": {
"schema": "iglu:com.example/basket_add/jsonschema/1-0-0",
"data": {}
},
"context": [{
"schema": "iglu:com.example/basket/jsonschema/1-0-0",
"data": {
"action": "add",
"id": 12345,
"total": 100
},
"schema": "iglu:com.example/product/jsonschema/1-0-0",
"data": {
"name": "example_name",
"quantity": 1,
"price": 100,
"category": "example_category",
"sku": "example_sku"
}
}]
});
The main disadvantage we see with this is having to maintain many blank schemas for different events. Also for going through a deployment to add any new ones.
However, a structured event always depends on end-users having to pick what category and action values are required and can be a bit arbitrary.