Add cart and purchase tracking to your search analytics pipeline and use ES|QL to answer the question every product manager asks: which search queries drive the most revenue? Your product manager wants to know which searches drive the most revenue. You can tell them what users search for ( check out our second blog ) and what they click ( in our third blog ), but not what they buy. Two new span types, add-to-cart and purchase, complete a four-stage funnel from search query to checkout, built on the same search. * attributes and ES|QL queries you've been using since Blog 2.
About 20 lines of code, and every relevance decision you make gets a revenue number attached to it. Add conversion tracking (add-to-cart and purchase spans) with search. * attributes that tie back to the originating search. Build a full search-to-revenue funnel: search → click → add-to-cart → purchase. Write Elasticsearch Query Language (ES|QL) queries to calculate conversion rates, revenue per query, and average order value. Identify where users drop off and which team should own each drop-off point. Attribute revenue to specific search queries for prioritizing relevance work.
Click tracking from Blog 3 (search + click spans flowing to Elastic via OTel-native ingestion). Backend endpoints for add-to-cart and checkout events (example code provided). Your product manager walks into a meeting and asks, "Which searches are driving the most revenue? " You can tell them what users search for ( Blog 2 ) and what they click ( Blog 3 ). But you can't tell them what they buy . The gap between "clicked a result" and "purchased a product" is where the business case for search investment lives, and right now it's invisible. This post closes the loop.
By adding two more span types (add-to-cart and purchase), you get a full funnel from search to revenue, built on the same search. * attributes and ES|QL queries you've been using since Blog 2 . Here's what conversion tracking lets you answer and why each question matters to different people on your team. Which searches drive revenue? This is the product manager's question. When you can attribute dollars to specific queries, you can prioritize relevance work by business impact.
