Segment for visits thats include a specific page type only once within a visit | Community
Skip to main content
November 22, 2023
Solved

Segment for visits thats include a specific page type only once within a visit

  • November 22, 2023
  • 1 reply
  • 1815 views

Hi, 

I want to create a segment for users who viewed one of two specific pageTypes in their visit (lets call these pageType A and pageType B). I am currently using a visit level segment that excludes hits where previous pageType = A or B, and another container where pagetype = A or B. When I apply this segment within a flow diagram (with my dimension being pagetype) this still returns pagetype A and B in subsequent hits. 

Any guidance on how to return visits that viewed pageType A or B only once would be much appreciated. 

Thanks.

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

the same issue persists with or without the "within" applied


Okay, sorry about that.. we had to make this a little bit more complex (I'm a bit jet-lagged at the moment)

 

VISIT

    Container (HIT)

        Page equals Page A

        OR

        Page equals Page B

    AND

    EXCLUDE Container (VISIT)

        Container (HIT)

            Page equals Page A

            OR

            Page equals Page B

        THEN

        Container (HIT)

            Page equals Page A

            OR

            Page equals Page B

 

 

Basically, you are looking for Visits that contain Page A or B, but you are excluding Visits that have Page A or B THEN Page A or B....

 

This should get you want you are looking for.

1 reply

abhinavbalooni
Community Advisor
Community Advisor
November 22, 2023

Hey @rtrwrwer 

I deleted the earlier response I missed the part where you are just looking for once viewed.

 

Try sequencing in this case.

 

Create a visit level segment. Within that, create a hit level segment checking for pagetype A or B and then create another hit container with the same condition. In the small clock icon where you can add 'then' condition, add withing 1 Visit. This will give you all the folks who did view it more than once. If you create an exclusion on the above, you should get the numbers you are looking for.

 

Here's a link that should help:

https://experienceleague.adobe.com/docs/analytics/components/segmentation/segmentation-workflow/seg-sequential-build.html?lang=en

 

Cheers,

Abhinav

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
November 22, 2023

I agree with the sequence suggestion...

 

I think you want the following:

 

Saw either A OR B, once (then didn't see either A or B again in the visit)

So

  • Page A > Page C > Page 😧 include
  • Page B > Page C > Page 😧 include
  • Page A > Page C > Page B > Page 😧 don't include
  • Page B > Page A > Page C > Page 😧 don't include
  • Page A > Page C > Page A > Page 😧 don't include
  • Page B > Page C > Page D > Page B: don't include

 

Right?

 

So you should be able to do something like:

VISIT

    Hit Container (you could also use a single "equals any of", but this is more readable)

        Page equals Page A

        OR

        Page equals Page B

    THEN

    EXCLUDE VISIT

        Hit Container (you could also use a single "equals any of", but this is more readable)

            Page equals Page A

            OR

            Page equals Page B

 

 

You would have to test this, but in theory this should exclude all visits that contain a second instance of A or B

rtrwrwerAuthor
November 22, 2023

Hi Both, 

Thanks for your response, much appreciated. I tried doing what has been suggested, but it returns zero visits, and the segment builder shows an error saying that it is not a valid input: