Calculated Metric Help | Community
Skip to main content
occ2
Level 2
October 28, 2024
Solved

Calculated Metric Help

  • October 28, 2024
  • 1 reply
  • 799 views

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!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Jennifer_Dungan

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:

 

1 reply

Jennifer_Dungan
Community Advisor and Adobe Champion
Jennifer_DunganCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
October 29, 2024

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:

 

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
October 29, 2024

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