Expand my Community achievements bar.

Join us for our next community Coffee Break on February 28th! Four of our Analytics Champions will be joining us to discuss Summit tips, best practices, and any of your Analytics questions!
SOLVED

How is the After Sequence counting in a particular segment

Avatar

Level 9

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.

RobertBlakeley_0-1702830656519.png

 

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?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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.

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

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.

Avatar

Level 9

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

Avatar

Community Advisor

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)

Avatar

Community Advisor

@Jennifer_Dungan wrote:

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)


From https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-discussions/tips-from-adobe-analyti... see 2019 tips from Audrey Salerno, her slides 2-13, for how to get the segment for just before. Theoretically, it should be possible to user her tip to get the segment for just after too.