Items in Cart from Previous Visit | Community
Skip to main content
January 30, 2025
Solved

Items in Cart from Previous Visit

  • January 30, 2025
  • 1 reply
  • 454 views

I want to count the number of visits to our site that begin with items already in cart from a previous visit. The logic would be something like:

 

count(visits) IF[visitor(cart additions>cart removals) AND visitor(orders=0)]

 

I have all of the necessary metrics but I can't get the logic to work in either segments or a calculated metric.

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

Hi, 

 

So I am thinking this could be simplified... Do you track the number of items in the cart on every page?

 

If so, why not simply make a segment like:

 

HIT [

    Hit Depth equals 1

    AND

   Items in Cart is greater than or equal to 1

]

 

Or maybe:

 

 HIT [

    Hit Depth equals 1

    AND

   Items in Cart equals true

]

 

OR

 

 HIT [

    Hit Depth equals 1

    AND

   Items in Cart exists

]

 

 

 

Basically Hit Depth is a per visit metric that tracks increments the hit depth in the visit.... so a Hit Depth of 1 would be the first tracking call in a visit, and if you have info about what is in the cart, whether it be a count of items, a simple "true or false" if items exists, or maybe something that tracks some information about the cart having content that you can check if it exists....

 

 

Then you can just pair this segment with your Visits metric, and there you have the number of visits that started the visit with items in their cart.

1 reply

Jennifer_Dungan
Community Advisor and Adobe Champion
Jennifer_DunganCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
January 31, 2025

Hi, 

 

So I am thinking this could be simplified... Do you track the number of items in the cart on every page?

 

If so, why not simply make a segment like:

 

HIT [

    Hit Depth equals 1

    AND

   Items in Cart is greater than or equal to 1

]

 

Or maybe:

 

 HIT [

    Hit Depth equals 1

    AND

   Items in Cart equals true

]

 

OR

 

 HIT [

    Hit Depth equals 1

    AND

   Items in Cart exists

]

 

 

 

Basically Hit Depth is a per visit metric that tracks increments the hit depth in the visit.... so a Hit Depth of 1 would be the first tracking call in a visit, and if you have info about what is in the cart, whether it be a count of items, a simple "true or false" if items exists, or maybe something that tracks some information about the cart having content that you can check if it exists....

 

 

Then you can just pair this segment with your Visits metric, and there you have the number of visits that started the visit with items in their cart.