How is the After Sequence counting in a particular segment | Community
Skip to main content
RobertBlakeley
Community Advisor
Community Advisor
December 17, 2023
Solved

How is the After Sequence counting in a particular segment

  • December 17, 2023
  • 1 reply
  • 1115 views

This question is about a segment created by @urs_boller  back in 2019. This segment identifies the last page in a visit. It does work. I need some help in understanding why this works.

 

More specifically, the segment uses an after sequence to identify the pages after the criteria is met and then excludes them. Normally, the last item of the sequence itself and the subsequent items are included in the after sequence result. So, for the following example, if the sequence were page A then page B, the result would be B, C, D.

page A
page B
page C
page D

In this case the segment is a date then a metric PV. I am assuming Day and PV happens for every page and the segment is set multiple times in the above example. The result is A, B, C (which is then excluded from the visit, leaving D, the last page). If the criteria is met on page A, why does this "after" sequence not count D?

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

Looking at this, yes, this sequence uses very "inclusive" logic, i.e. Day exists (which you are correct, is part of every hit), THEN Page exists (again, Page is part of every page view).

 

The segment as a whole is looking for a single HIT, and excluding the sequence within the container... In this case "Only After: Day THEN Page"

 

 

So let's try to break it down, using your A > B > C > D example.

 

Hit on A

There is a page view (B) after this page. Therefore, the combination of Hit A, and A (having Day value, and B having Page value AFTER / INCLUDING Page A in the sequence) is excluded.

 

So while there is a HIT on page A, the exclusion container now removes it from the segment... returning nothing for this page in the Visit.

 

Hits on B and C

Follow the same logic as above, as they too have pages in the sequence that follow them, therefore, they are excluded by the segment, and not returned

 

Hit on D

Now we have the last page in the visit... It has a Day value, like the pages above, but because it's the last page in the Visit (and the exclude segment is only looking at the current hit and after, the exclusion container doesn't actually match... there is no "then Page View" following Page D...

 

Therefore, the HIT on D exists and the exclusion container doesn't have a match, so D is not excluded from the segment as a whole... 

 

 

This is really a very elegant solution.

1 reply

Jennifer_Dungan
Community Advisor and Adobe Champion
Jennifer_DunganCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
December 18, 2023

Looking at this, yes, this sequence uses very "inclusive" logic, i.e. Day exists (which you are correct, is part of every hit), THEN Page exists (again, Page is part of every page view).

 

The segment as a whole is looking for a single HIT, and excluding the sequence within the container... In this case "Only After: Day THEN Page"

 

 

So let's try to break it down, using your A > B > C > D example.

 

Hit on A

There is a page view (B) after this page. Therefore, the combination of Hit A, and A (having Day value, and B having Page value AFTER / INCLUDING Page A in the sequence) is excluded.

 

So while there is a HIT on page A, the exclusion container now removes it from the segment... returning nothing for this page in the Visit.

 

Hits on B and C

Follow the same logic as above, as they too have pages in the sequence that follow them, therefore, they are excluded by the segment, and not returned

 

Hit on D

Now we have the last page in the visit... It has a Day value, like the pages above, but because it's the last page in the Visit (and the exclude segment is only looking at the current hit and after, the exclusion container doesn't actually match... there is no "then Page View" following Page D...

 

Therefore, the HIT on D exists and the exclusion container doesn't have a match, so D is not excluded from the segment as a whole... 

 

 

This is really a very elegant solution.

RobertBlakeley
Community Advisor
Community Advisor
December 18, 2023

I see. So the part I was missing was that the PV "Then" is is counted in the next call. Thank you.

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
December 18, 2023

The weird thing about "Only Before" and "Only After" is that they are really "Only Before AND Including the sequence" and "Only After AND Including the sequence".

 

We really need more options... stuff that is really just before and just after, as well as just between (and I guess between and including)