Hi team,
I have a segment to include a list of pages based on the folder or a specific URL. I use:
Include HIT
Canonical URL starts with "https://www.xxx.com/us/en/folder-1" name
or
Canonical URL starts with "https://www.xxx.com/us/en/folder-2" name
Now I need to exclude one page url from "https://www.xxx.com/us/en/folder-1" folder.
For this rule I can't use "or" as that brings back more URLs outside of the desired folders. And I can't use a mix of "or" and "and".
If I add a new container to have Exclude HIT, that container gets added within the first "Include HIT" container. So I am still unable to use a mix of "or" and "and" between those two containers. I found this example in the community which is something that I think is similar to what I am trying to do, but again I can't add a mix of Pages as one container with "or" and another container to Exclude HIT one page URL.
Can you please advise on how to solve it?
Thank you!
Solved! Go to Solution.
Views
Replies
Total Likes
You can absolutely do this with containers and using both "or" and "and".
In your Hit Level Segment, first create one container... inside this container add your Canonical URL contains rules with "or"
The create a second container (using an "and" between the containers) and make the second container an exclude, then add the url you want excluded
Like so:
This will result in your segment returning all the urls that contain "A" or "B" but exclude "C"
The example you linked to was a little more simple... it only had 1 item being matched, so that didn't need to be in it's own container... so they only used one container to perform the exclude...
In your case, since you need to use an "Or" for your inclusions, you just need to wrap them in their own container so you can use the "or" for the various options, and then use the "and" between the two containers.
Think I figured it out. I had to add two containers within one main container. That allowed me to do one container with "or" and then second container added as "and". Screenshot below.
Thank you!
Views
Replies
Total Likes
You can absolutely do this with containers and using both "or" and "and".
In your Hit Level Segment, first create one container... inside this container add your Canonical URL contains rules with "or"
The create a second container (using an "and" between the containers) and make the second container an exclude, then add the url you want excluded
Like so:
This will result in your segment returning all the urls that contain "A" or "B" but exclude "C"
The example you linked to was a little more simple... it only had 1 item being matched, so that didn't need to be in it's own container... so they only used one container to perform the exclude...
In your case, since you need to use an "Or" for your inclusions, you just need to wrap them in their own container so you can use the "or" for the various options, and then use the "and" between the two containers.
Thank you @Jennifer_Dungan for your reply. I made an update earlier this morning with the same solution:) We are all on the same page. Thanks again!
Views
Likes
Replies