If done correctly, tracking user activity can be a powerful software quality tool. It can give us invaluable insights on what promotions and products are more popular in relation to others, what the preferences of the user are, and what features turn out to be more or less successful and performant.
I am currently a part of building one of the biggest e-commerce websites in Germany. Each team is responsible for collecting all the tracking data for the features they develop. My team’s approach to tracking has gone through multiple iterations and learnings that I would like to share, including answers we found to challenges like how to tackle code complexity in the frontend layer, where to store the tracking data, how to integration test the data collection, or how to find a common language between business analysts and software designers.
6. 6
ORGANIZATION AT OTTO
Frontend Integration
Shopofce
Backend Integration
Shoppages
Searchandnavi
Product
P13N
Order
User
Aftersales
Tracking
Auth
ELCH
7. 7
● My team – personalization. We deliver
personalized content in various formats
● Techstack: Java, plain javascript, FreeMarker
Templates, SASS and etc.
MY TEAM - P13N
12. REFACTORING OVER
LAST 6 MONTHS
Goal: come up with a generic tracking architecture that will
unify the concept of tracking for all of the content we deliver
18. 18
● Before: promo_Content could mean product, cinema,
or have no meaning at all
● promo_Position could mean position within the
cinema or order on the page
● Bloated code with diferent meanings for all the keys
● Promotions inside diferent cinemas could not be
analyzed in the same way
promo_
Content
promo_
Source
promo_
Position
promo_
FilledSlots
promo_
Type
promo_
Activity
20. 20
SLIMMER JS LAYER
BE Object BE ObjectBE Object BE Object BE Object BE Object
JS Object JS ObjectJS Object
Tracking
Adapter
Tracking
Adapter
Tracking
Adapter
Tracking
Adapter
JS Object JS ObjectJS ObjectVS
● Example: each cinema had specifc implementation
for each of the keys
● There was a lot of DOM traversal as in the case for #
of total promotions
21. 21
● Trackable information available in the BE is stored
inside the page's html in a single div element
● Dynamic content based on the device/size of the
browser window = certain information can only come
from the FE
{"cinemaType":"slidingCinema","promotions":
[{"type":"promotion","content":"01","source":"auto"},
{"type":"promotion","content":"02","source":"auto"}]}
31. 31
● More precise KPIs: products that were viewed as less
performant could actually be out of the user's eye
● Less data sent on mobile devices – less trafc on a
mobile device
{"promo_Position":"1|2”,
"promo_Activity":"view|view”,
"promo_Content":"123|456",
"promo_Type":"Sliding|Sliding",
"promo_FilledSlots":"7|7",
"promo_Source":"auto|auto”}
{"promo_Position":"1|2|3|4|5|6|7",
"promo_Activity":"view|view|view|view|view|view|view",
"promo_Content":"123|456|789|001|002|003|004",
"promo_Type":"Sliding|Sliding|Sliding|Sliding|Sliding|
Sliding|Sliding",
"promo_FilledSlots":"7|7|7|7|7|7|7",
"promo_Source":"auto|auto|auto|auto|auto|auto|auto”}
VS
34. 34
● Unifed business concept is essential
● Reduce FE complexity
● There are smart ways to generalize click
binding
● Less = More
● Monitoring – as important as Testing
CONCLUSION
35. 35
THANKS
For questions or suggestions:
Anastasia Belozertseva
abelozer@thoughtworks.com
@anastasia_a_b
Further readings and sources:
http://otto.de
http://snowplowanalytics.com/blog/2013/08/12/towards-
universal-event-analytics-building-an-event-grammar/