Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

The Lego Data Layer

3,190 views

Published on

An unconventional approach to data layer design

Published in: Data & Analytics
  • Be the first to comment

The Lego Data Layer

  1. 1. The Lego Data Layer
  2. 2. Digital Event Grammar: subject + verb + object + context Ecommerce:
  3. 3. Files downloaded, buttons and links clicked, pages seen…. Stuff that users interacted with directly (the object) We track it, then classify it.
  4. 4. Then came Enhanced Ecommerce ... enables the measurement of user interactions with products on ecommerce websites ...
  5. 5. It doesn’t “fit” Sometimes product is object, other times it’s part of context.
  6. 6. 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
  7. 7. It’s not the clicked button that counts (the object). But the business entity that click is related to.
  8. 8. Link interactions to the business entities they’re related to at data collection time. subject + verb + object + context + entity
  9. 9. The Entity Dictionary: - Standalone attributes - Gained attributes
  10. 10. Interaction -> system composed of business entities
  11. 11. Simply “slot” entities into the structure of the new interaction.
  12. 12. Especially when you have parent-child relationships.
  13. 13. New attributes automatically “travel” with the entity. They trickle through to the entities and interactions they’re a part of.
  14. 14. How does it work in practice
  15. 15. 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> } }
  16. 16. …human friendly for us 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>
  17. 17. Get devs to create helpers who get the dictionaries ready.
  18. 18. Call on the helpers immediately after the interaction occurs.
  19. 19. Meet the entity dictionary workhorse
  20. 20. Automatically highlight changes + product.cohort_added + product.date_added ! - product.brand.variation
  21. 21. Automatically create human friendly spec product id // server-side / client-side markup variations number // server-side ! brand name // server-side !
  22. 22. 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]" } } }
  23. 23. Automatically create HTML5 markup spec <* data-entity=“product” data-product-id=“value” data-product-context-collection-position=“ value” >
  24. 24. Special thanks…. Alex & Yali snowplowanalytics.com ! Simo Ahava simoahava.com
  25. 25. Data Layer = like a box of ready-made Lego characters (but for analytics). In-depth blog post series: http://clearclu.es/LegoLayer @carmenmardiros

×