the lego data layer

25
The Lego Data Layer

Upload: carmen-mardiros

Post on 22-Nov-2014

882 views

Category:

Data & Analytics


1 download

DESCRIPTION

An unconventional approach to data layer design

TRANSCRIPT

Page 1: The Lego Data Layer

The Lego Data Layer

Page 2: The Lego Data Layer

subject + verb + object + context

Digital Event Grammar:

Ecommerce:

Page 3: The Lego Data Layer

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

Stuff that users interacted with directly (the object)

We track it, then classify it.

Page 4: The Lego Data Layer

Then came Enhanced Ecommerce

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

websites ...

Page 5: The Lego Data Layer

It doesn’t “fit”

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

Page 6: The Lego Data Layer

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

Page 7: The Lego Data Layer

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

But the business entity that click is related to.

Page 8: The Lego Data Layer

Link interactions to the business entities

they’re related to at data collection time.

subject + verb + object + context + entity

Page 9: The Lego Data Layer

The Entity Dictionary:

- Standalone attributes - Gained attributes

Page 10: The Lego Data Layer

Interaction -> system composed of business entities

Page 11: The Lego Data Layer

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

Page 12: The Lego Data Layer

Especially when you have parent-child relationships.

Page 13: The Lego Data Layer

New attributes automatically “travel” with the entity.

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

Page 14: The Lego Data Layer

How does it work in practice

Page 15: The Lego Data Layer

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> } }

Page 16: The Lego Data Layer

…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>

Page 17: The Lego Data Layer

Get devs to create helpers who get the dictionaries

ready.

Page 18: The Lego Data Layer

Call on the helpers immediately after the interaction occurs.

Page 19: The Lego Data Layer

Meet the entity dictionary workhorse

Page 20: The Lego Data Layer

Automatically highlight changes

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

Page 21: The Lego Data Layer

Automatically create human friendly spec

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

Page 22: The Lego Data Layer

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]" } } }

Page 23: The Lego Data Layer

Automatically create HTML5 markup spec

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

Page 24: The Lego Data Layer

Alex & Yali snowplowanalytics.com !

Simo Ahava simoahava.com

Special thanks….

Page 25: The Lego Data Layer

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

(but for analytics).

@carmenmardiros

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