I am working on answering a question about our search results page and I am hoping that there is a calculated metric that can be built to solve this. I have created a metric that can be used to gauge our search relevancy, that is structured as cart additions on our SRP divided by total searches. However, I'd also like to create a binary metric that will return 1 if an user adds to cart from the SRP, and 0 if an user does not add to cart on the SRP.
Is this achievable in the calculated metric builder? Any advice or tips are greatly appreciated!
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
If you have a dimension or event on your "Add to Cart from SRP" (even using a combination of page with the add to cart event) you should be able to use this with the IF function.
At a basic functionality level, the IF statement can be use to determine if a metric exists in a certain context (like add to cart from SRP)... if true, you can pass either your Add to Cart metric (or you can use a static 1).... and if false, then set a static 0:
So many something like:
If you have a dimension or event on your "Add to Cart from SRP" (even using a combination of page with the add to cart event) you should be able to use this with the IF function.
At a basic functionality level, the IF statement can be use to determine if a metric exists in a certain context (like add to cart from SRP)... if true, you can pass either your Add to Cart metric (or you can use a static 1).... and if false, then set a static 0:
So many something like:
Or if you are assigning 1 or 0 based on the visitor, use a Visitor based segment, and just assign static 1 or 0 based on the criteria
Thank you @Jennifer_Dungan. I have a follow up question--do you know how we can determine the count of times in a given time period where this criteria is true or false. For example the unique count of times where a visitor added to cart on the SRP (the unique count of 'if true' in the example above).
Views
Replies
Total Likes
Well if you have an action like "Add to Cart", if your segment is based on the action of adding it to the cart *Hit scope), then it should already be the individual hits.
So a HIT segment:
HIT
addToCart exists
AND
Page Type equals search result
If you use this segment in your calculated metric, every "addToCart" should be counted per hit... giving you the total
If you are looking for Visits or Visitors that do this action, then you would use a segment scoped to that.... you might need multiple columns... one for the VISITOR level, and one for the HIT level... just be aware, that when you have VISITOR scope... if that visitor did the action once (let's say on Oct 1)... that same Visitor would be counted every time they come to the site in Oct if that is your panel range (even if they didn't perform the action on Oct 27th for instance)
The Hit will be explicitly tied to the action and the day / time in which the action was performed.
Views
Replies
Total Likes
Views
Likes
Replies