Successfully reported this slideshow.

Funnel Analysis in Hadoop at Etsy

26

Share

1 of 134
1 of 134

Funnel Analysis in Hadoop at Etsy

26

Share

Download to read offline

As an ecommerce site with more than 800,000 different sellers, Etsy is particularly interested in understanding how shoppers find the items they seek. Part of this understanding involves attributing successful purchases to specific features on the site. This attribution model allows us to compare and refine Etsy’s features, but also provides valuable signals for A/B testing, search quality, and recommenders. However, the path to a successful handmade purchase often involves multiple features over the course of several visits.

This talk will discuss the challenges of funnel analysis at Etsy and the corresponding deficiencies of several widely used web analytics tools. We’ll then dive into our event sequence matching tool, which we’ve successfully applied to hundreds of millions of visits in a single Hadoop job and is widely used across our big data stack. Finally, we’ll take a look at some of our applications of the tool and compare it to related work.

As an ecommerce site with more than 800,000 different sellers, Etsy is particularly interested in understanding how shoppers find the items they seek. Part of this understanding involves attributing successful purchases to specific features on the site. This attribution model allows us to compare and refine Etsy’s features, but also provides valuable signals for A/B testing, search quality, and recommenders. However, the path to a successful handmade purchase often involves multiple features over the course of several visits.

This talk will discuss the challenges of funnel analysis at Etsy and the corresponding deficiencies of several widely used web analytics tools. We’ll then dive into our event sequence matching tool, which we’ve successfully applied to hundreds of millions of visits in a single Hadoop job and is widely used across our big data stack. Finally, we’ll take a look at some of our applications of the tool and compare it to related work.

More Related Content

Related Books

Free with a 14 day trial from Scribd

See all

Funnel Analysis in Hadoop at Etsy

  1. 1. Funnel Analysis in Hadoop at Etsy Steve Mardenfeld, Wil Stuckey, Matt Walker Tuesday, March 12, 13
  2. 2. Tuesday, March 12, 13
  3. 3. Handmade MarketPlace Tuesday, March 12, 13
  4. 4. Tuesday, March 12, 13
  5. 5. Data Driven Development • Use data to make informed decisions • Use data to evaluate the efficacy of our products Tuesday, March 12, 13
  6. 6. Funnel Analysis Tuesday, March 12, 13
  7. 7. Registration Funnel Tuesday, March 12, 13
  8. 8. Registration Funnel 50,000 10,000 100% 20% Tuesday, March 12, 13
  9. 9. Registration Funnel 50,000 45,000 15,000 10,000 100% 90% 33% 60% 100% 90% 29% 20% Tuesday, March 12, 13
  10. 10. Funnels ++ • Funnels are more than just an optimization tool • Use them to understand different pathways throughout our site • Partition and compare these pathways by attributes • A/B tests, categories, queries, cohorts • Attribution model Tuesday, March 12, 13
  11. 11. Attribution Models • Tie conversions and successes to specific products and actions • Use to gain understanding of our users’ interaction with Etsy • Help us to measure gains in A/B testing • Easily compare different varieties of the same product • Attribution techniques for internal and external attribution Tuesday, March 12, 13
  12. 12. Attributions Illustrated Tuesday, March 12, 13
  13. 13. Attributions Illustrated • last product interaction - browse Tuesday, March 12, 13
  14. 14. Attributions Illustrated • last product interaction - browse • co-occurrence - search and browse Tuesday, March 12, 13
  15. 15. Attributions Illustrated • last product interaction - browse • co-occurrence - search and browse • direct funnel attribution - search Tuesday, March 12, 13
  16. 16. Indirect Attribution Illustrated Tuesday, March 12, 13
  17. 17. Indirect Attribution Illustrated • direct funnel attribution - shop home Tuesday, March 12, 13
  18. 18. Indirect Attribution Illustrated • direct funnel attribution - shop home • indirect funnel attribution - search Tuesday, March 12, 13
  19. 19. Aggregate Results Direct Search Clicked Listing Purchased Events 50,000 25,000 5,000 Tuesday, March 12, 13
  20. 20. Aggregate Results Direct Search Clicked Listing Purchased Events 50,000 25,000 5,000 Indirect Search Clicked Listing Shop Clicked Listing Purchased Events 50,000 25,000 10,000 5,000 3,000 Tuesday, March 12, 13
  21. 21. Aggregate Results Direct Search Clicked Listing Purchased Events 50,000 25,000 5,000 Indirect Search Clicked Listing Shop Clicked Listing Purchased Events 50,000 25,000 10,000 5,000 3,000 Combined Search Clicked Listing Purchased Events 50,000 25,000 8,000 Tuesday, March 12, 13
  22. 22. Segmenting Within Funnels Old Algorithm Search Clicked Listing Purchased Counts 50,000 20,000 15,000 New Hotness Search Clicked Listing Purchased Counts 100,000 60,000 15,000 Tuesday, March 12, 13
  23. 23. Segmenting Within Funnels Old Algorithm Search Clicked Listing Purchased Step 100% 50% 40% To t a l 100% 50% 20% New Hotness Search Clicked Listing Purchased Step 100% 60% 25% To t a l 100% 60% 15% Tuesday, March 12, 13
  24. 24. Segmenting Across Funnels * Clicked Listing Purchased Search 100% 50% 40% Browse 100% 40% 30% Home 100% 60% 36% Activity Feed 100% 62% 28% Ta s t e Te s t 100% 47% 31% Search Ads 100% 45% 38% Tuesday, March 12, 13
  25. 25. Democratized Funnels How do we make this awesomeness available for everyone? Tuesday, March 12, 13
  26. 26. Tuesday, March 12, 13
  27. 27. Awesome infrastructure but... • Must be an engineer to write your own queries • Engineering resources become the bottleneck • Hard to scale as the company grows Tuesday, March 12, 13
  28. 28. So we want to: • Allow the data engineers to focus on higher priority things. • Allow people to answer their own questions. Tuesday, March 12, 13
  29. 29. How do we do this? Tuesday, March 12, 13
  30. 30. The Path of Funnel Tools google spreadsheets internal tools • Funnel Cake • Feature Funnel Tuesday, March 12, 13
  31. 31. Funnel Cake Tuesday, March 12, 13
  32. 32. Version 1 Tuesday, March 12, 13
  33. 33. Real Time Tuesday, March 12, 13
  34. 34. Lets do it in PHP! Tuesday, March 12, 13
  35. 35. Why? Tuesday, March 12, 13
  36. 36. It’s the “Etsy Way” • Already have existing infrastructure • Operationally stable • The same tools everyone else is using means a better adoption rate across Engineering Tuesday, March 12, 13
  37. 37. • Event Stream • Code runs on every page view • Simple matching system • (ab)Used memcached as a temporary storage • Rolled up to DB every min (near real time) Tuesday, March 12, 13
  38. 38. What happened? Tuesday, March 12, 13
  39. 39. Broader adoption! Over 75 Funnels were created Tuesday, March 12, 13
  40. 40. Shiny Visualized Results Tuesday, March 12, 13
  41. 41. • Funnels had to be setup ahead of time (no backfills) • Reconciliation is hard • Limited to events in our web clickstream (ios/android would be excluded) • Scaling and Operational issues • Difficult to maintain multiple stacks Tuesday, March 12, 13
  42. 42. Turns out that we don’t make Product decisions in real time http://mcfunley.com/whom-the-gods-would-destroy-they-first-give-real-time-analytics Tuesday, March 12, 13
  43. 43. Version 2 Tuesday, March 12, 13
  44. 44. Tuesday, March 12, 13
  45. 45. Getting back on the elephant • Able to carry over the User Interface from v1 • Standardized event sessionization • Operationally supported infrastructure • Nightly batch process Tuesday, March 12, 13
  46. 46. Feature Funnel Tuesday, March 12, 13
  47. 47. Attribution for ALL Tuesday, March 12, 13
  48. 48. Built in metrics • Click through rate • Listing impressions • Purchase rate - • Purchase from shop rate • Favorite from shop rate • More... Tuesday, March 12, 13
  49. 49. Built in metrics • Click through rate - Direct Attribution • Listing impressions - Direct Attribution • Purchase rate - Direct Attribution • Purchase from shop rate - Indirect Attribution • Favorite from shop rate - Indirect Attribution • More... - Tuesday, March 12, 13
  50. 50. Segmentation • Primarily used for A/B test analysis • Arbitrary segmentation Tuesday, March 12, 13
  51. 51. How do we get it? Tuesday, March 12, 13
  52. 52. How do we get it? select (clicks/visits * 100.0) as "CTR"  from feature_funnel   where event_type = 'search'   and ab_test = 'sitewide'   and epoch_s = 1361318400   and group_name = 'ALL_GROUPINGS'; Tuesday, March 12, 13
  53. 53. The Future? Tuesday, March 12, 13
  54. 54. Features • Eliminate the need for an engineer to write the queries • Robust segmentation • Not be limited to visit sessions • Run Ad Hoc queries Tuesday, March 12, 13
  55. 55. Build your own Funnels show the builder ui here Tuesday, March 12, 13
  56. 56. Mechanics of Funnel Analysis Tuesday, March 12, 13
  57. 57. Input • Event sequences • Typically visits to website • Sessionization scheme left to developer Tuesday, March 12, 13
  58. 58. Tuesday, March 12, 13
  59. 59. Funnel • Search • Listing • Cart Tuesday, March 12, 13
  60. 60. Tuesday, March 12, 13
  61. 61. Tuesday, March 12, 13
  62. 62. Tuesday, March 12, 13
  63. 63. Tuesday, March 12, 13
  64. 64. Tuesday, March 12, 13
  65. 65. Query • Only discussed event types • Funnel steps require additional constraints: • Listing referred by search • Added that listing to cart Tuesday, March 12, 13
  66. 66. Search query “dinosaur” listing_ids 119469855, 90583707, ... “http://www.etsy.com/search/handmade/patterns? loc q=dinosaur&order=most_relevant&view_type=gallery&ship_to=ZZ” ... ... Tuesday, March 12, 13
  67. 67. Listing listing_id 119469855 “http://www.etsy.com/search/handmade/patterns? ref q=dinosaur&order=most_relevant&view_type=gallery&ship_to=ZZ” shop_id 7415158 ... ... Tuesday, March 12, 13
  68. 68. Cart added_listing_id 119469855 cart_listing_ids 119469855, ... cart_type guest ... ... Tuesday, March 12, 13
  69. 69. Query • Listing referred by search • Added that listing to cart Tuesday, March 12, 13
  70. 70. Search query “dinosaur” listing_ids 119469855, 90583707, ... “http://www.etsy.com/search/handmade/patterns? loc q=dinosaur&order=most_relevant&view_type=gallery&ship_to=ZZ” ... ... Tuesday, March 12, 13
  71. 71. Listing listing_id 119469855 “http://www.etsy.com/search/handmade/patterns? ref q=dinosaur&order=most_relevant&view_type=gallery&ship_to=ZZ” shop_id 7415158 ... ... Tuesday, March 12, 13
  72. 72. Listing listing_id 119469855 “http://www.etsy.com/search/handmade/patterns? ref q=dinosaur&order=most_relevant&view_type=gallery&ship_to=ZZ” shop_id 7415158 ... ... listing.ref == search.loc Tuesday, March 12, 13
  73. 73. Cart added_listing_id 119469855 cart_listing_ids 119469855, ... cart_type guest ... ... Tuesday, March 12, 13
  74. 74. Cart added_listing_id 119469855 cart_listing_ids 119469855, ... cart_type guest ... ... cart.added_listing_id == listing.listing_id Tuesday, March 12, 13
  75. 75. Query • Search • Listing & Referred • Cart & AddedListing Tuesday, March 12, 13
  76. 76. Pattern Matching • Apply query to event sequence • Select out tuples of matching events Tuesday, March 12, 13
  77. 77. What About Incomplete Funnels? Tuesday, March 12, 13
  78. 78. Tuesday, March 12, 13
  79. 79. null Tuesday, March 12, 13
  80. 80. null null Tuesday, March 12, 13
  81. 81. Funnel Analysis • Replace events with 1 • Replace nulls with 0 • Sum Tuesday, March 12, 13
  82. 82. null null null Tuesday, March 12, 13
  83. 83. 1 1 1 1 1 null 1 null null Tuesday, March 12, 13
  84. 84. 1 1 1 1 1 0 1 0 0 Tuesday, March 12, 13
  85. 85. 3 2 1 Tuesday, March 12, 13
  86. 86. min(3, 1) min(2, 1) min(1, 1) Tuesday, March 12, 13
  87. 87. 1 1 1 Tuesday, March 12, 13
  88. 88. What Do We Keep? Tuesday, March 12, 13
  89. 89. Tuesday, March 12, 13
  90. 90. Search Listing Cart query “dinosaur” listing_id 119469855 added_listing_id 119469855 “http://www.etsy.com/search/handmade/patterns? listing_ids 119469855, 90583707, ... ref q=dinosaur&order=most_relevant&view_type=gal cart_listing_ids 119469855, ... lery&ship_to=ZZ” “http://www.etsy.com/search/handmade/patterns? loc q=dinosaur&order=most_relevant&view_type=gal shop_id 7415158 cart_type guest lery&ship_to=ZZ” ... ... ... ... ... ... Tuesday, March 12, 13
  91. 91. Tuesday, March 12, 13
  92. 92. Segmenting Funnels Tuesday, March 12, 13
  93. 93. Tuesday, March 12, 13
  94. 94. Search Listing Cart query “dinosaur” listing_id 119469855 added_listing_id 119469855 “http://www.etsy.com/search/handmade/patterns? listing_ids 119469855, 90583707, ... ref q=dinosaur&order=most_relevant&view_type=gal cart_listing_ids 119469855, ... lery&ship_to=ZZ” “http://www.etsy.com/search/handmade/patterns? loc q=dinosaur&order=most_relevant&view_type=gal shop_id 7415158 cart_type guest lery&ship_to=ZZ” ... ... ... ... ... ... Tuesday, March 12, 13
  95. 95. Listing Cart listing_id 119469855 added_listing_id 119469855 “http://www.etsy.com/search/handmade/patterns? ref q=dinosaur&order=most_relevant&view_type=gal cart_listing_ids 119469855, ... lery&ship_to=ZZ” query shop_id 7415158 cart_type guest ... ... ... ... Tuesday, March 12, 13
  96. 96. Cart added_listing_id 119469855 cart_listing_ids 119469855, ... query listing_id cart_type guest ... ... Tuesday, March 12, 13
  97. 97. query listing_id cart_type Tuesday, March 12, 13
  98. 98. Segmented Funnel Analysis • Extract segmenting properties • Compute indicators as before • Group on segmenting properties and sum Tuesday, March 12, 13
  99. 99. MapReduce • Work is done map-side • Common first step in our jobs • Expensive computation limited to first round mappers Tuesday, March 12, 13
  100. 100. Event Sequence Pattern Matching Tuesday, March 12, 13
  101. 101. Components • Predicate: matches/rejects events • Query: tuple of predicates • Match: tuple of events Tuesday, March 12, 13
  102. 102. Match Predicates • Select an event based on: • Full event sequence • Prior matched events • Current candidate Tuesday, March 12, 13
  103. 103. Match Predicate DSL • Combine predicates with logical operators • val Query = Seq(Search, Listing & Referred, Cart & AddedListing) Tuesday, March 12, 13
  104. 104. Semantics • Fixed number of events in match • Arbitrary number of matches per sequence • Collect and extend all partial matches Tuesday, March 12, 13
  105. 105. Tuesday, March 12, 13
  106. 106. Search Listing Shop Listing Cart Home Search Listing Search Tuesday, March 12, 13
  107. 107. Search, Listing, Shop, Listing, Cart, Home, Search, Listing, Search Tuesday, March 12, 13
  108. 108. Search, Listing, Shop, Listing, Cart, Home, Search, Listing, Search Query Root Search Listing & Referred Cart & AddedListing Tuesday, March 12, 13
  109. 109. Search, Listing, Shop, Listing, Cart, Home, Search, Listing, Search Query Root ? Search Listing & Referred Cart & AddedListing Tuesday, March 12, 13
  110. 110. Listing, Shop, Listing, Cart, Home, Search, Listing, Search Query Root Search Search Listing & Referred Cart & AddedListing Tuesday, March 12, 13
  111. 111. Listing, Shop, Listing, Cart, Home, Search, Listing, Search Query Root ? Search Search ? Listing & Referred Cart & AddedListing Tuesday, March 12, 13
  112. 112. Shop, Listing, Cart, Home, Search, Listing, Search Query Root Search Search Listing & Referred Listing Cart & AddedListing Tuesday, March 12, 13
  113. 113. Shop, Listing, Cart, Home, Search, Listing, Search Query Root ? Search Search ? Listing & Referred Listing ? Cart & AddedListing Tuesday, March 12, 13
  114. 114. Listing, Cart, Home, Search, Listing, Search Query Root Search Search Listing & Referred Listing Cart & AddedListing Tuesday, March 12, 13
  115. 115. Listing, Cart, Home, Search, Listing, Search Query Root ? Search Search ? Listing & Referred Listing ? Cart & AddedListing Tuesday, March 12, 13
  116. 116. Cart, Home, Search, Listing, Search Query Root Search Search Listing & Referred Listing Cart & AddedListing Tuesday, March 12, 13
  117. 117. Cart, Home, Search, Listing, Search Query Root ? Search Search ? Listing & Referred Listing ? Cart & AddedListing Tuesday, March 12, 13
  118. 118. Home, Search, Listing, Search Query Root Search Search Listing & Referred Listing Cart & AddedListing Cart Tuesday, March 12, 13
  119. 119. Home, Search, Listing, Search Query Root ? Search Search ? Listing & Referred Listing ? Cart & AddedListing Cart Tuesday, March 12, 13
  120. 120. Search, Listing, Search Query Root Search Search Listing & Referred Listing Cart & AddedListing Cart Tuesday, March 12, 13
  121. 121. Search, Listing, Search Query Root ? Search Search ? Listing & Referred Listing ? Cart & AddedListing Cart Tuesday, March 12, 13
  122. 122. Listing, Search Query Root Search Search Search Listing & Referred Listing Cart & AddedListing Cart Tuesday, March 12, 13
  123. 123. Listing, Search Query Root ? Search Search Search ? ? Listing & Referred Listing ? Cart & AddedListing Cart Tuesday, March 12, 13
  124. 124. Search Query Root Search Search Search Listing & Referred Listing Listing Cart & AddedListing Cart Tuesday, March 12, 13
  125. 125. Search Query Root ? Search Search Search ? ? Listing & Referred Listing Listing ? ? Cart & AddedListing Cart Tuesday, March 12, 13
  126. 126. Query Root Search Search Search Search Listing & Referred Listing Listing Cart & AddedListing Cart Tuesday, March 12, 13
  127. 127. null null null Tuesday, March 12, 13
  128. 128. Tuesday, March 12, 13
  129. 129. Tuesday, March 12, 13
  130. 130. Match Tree • Purely functional data structure • Holds matched events and indices • Match prefixes shared Tuesday, March 12, 13
  131. 131. Match Tree Algorithm • Fold over sequence accumulating tree • May extend any non-terminal node • Each level in tree corresponds to predicate Tuesday, March 12, 13
  132. 132. Practicality • Explodes, but • Queries are constant length • Sequences are bounded (visits) • Predicates constrain growth Tuesday, March 12, 13
  133. 133. Summary • Why funnels are interesting • What we’ve built with them at Etsy • Our approach to funnel analysis Tuesday, March 12, 13
  134. 134. Questions? • Steve Mardenfeld • Wil Stuckey @quiiver • Matt Walker @data_daddy Tuesday, March 12, 13

×