the lego data layer

Post on 22-Nov-2014

882 Views

Category:

Data & Analytics

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

An unconventional approach to data layer design

TRANSCRIPT

The Lego Data Layer

subject + verb + object + context

Digital Event Grammar:

Ecommerce:

Files downloaded, buttons and links clicked, pages seen….

Stuff that users interacted with directly (the object)

We track it, then classify it.

Then came Enhanced Ecommerce

... enables the measurement of user interactions with products on ecommerce

websites ...

It doesn’t “fit”

Sometimes product is object, other times it’s part of context.

Entity = a thing that’s of particular interest to the business.

The shopper The product The product category The transaction The shopping visit aka the checkout The promotion The campaign

It’s not the clicked button that counts (the object).

But the business entity that click is related to.

Link interactions to the business entities

they’re related to at data collection time.

subject + verb + object + context + entity

The Entity Dictionary:

- Standalone attributes - Gained attributes

Interaction -> system composed of business entities

Simply “slot” entities into the structure of the new interaction.

Especially when you have parent-child relationships.

New attributes automatically “travel” with the entity.

They trickle through to the entities and interactions they’re a part of.

How does it work in practice

Interaction recipe for GTM…"added_product_to_basket": { "action": { "category": "shopping", "timestamp": "1410962241" }, "user": <user dict>, "object": { "type": "product", "dict": <product dict> }, "context": { "notification": <notification dict>, "checkout": <checkout dict> } }

…human friendly for usadded_product_to_basket: action: category: shopping timestamp: 1410962241 user: <user dict> object: type: product dict: <product dict> context: notification: <notification dict> checkout: <checkout dict>

Get devs to create helpers who get the dictionaries

ready.

Call on the helpers immediately after the interaction occurs.

Meet the entity dictionary workhorse

Automatically highlight changes

+ product.cohort_added + product.date_added !- product.brand.variation

Automatically create human friendly spec

product id // server-side / client-side markup variations number // server-side ! brand name // server-side !

Automatically create precise JSON spec

{ "product": { "id": "[id of product]", "name": "[name of of product]", "variations": { "number": "[number of variations available]" }, "brand": { "name": "[manufacturer brand sold under]" } } }

Automatically create HTML5 markup spec

<* data-entity=“product” data-product-id=“value” data-product-context-collection-position=“value” >

Alex & Yali snowplowanalytics.com !

Simo Ahava simoahava.com

Special thanks….

Data Layer = like a box of ready-made Lego characters

(but for analytics).

@carmenmardiros

In-depth blog post series: http://clearclu.es/LegoLayer

top related