Question: create segment for specific URL expressions?

Avatar

Avatar

H_L

Avatar

H_L

H_L

15-09-2020

how to create segment in Analytics workspace, or Adhoc to filter the referred URL is:  https://www.domain.com/us/en/ ONLY? Country/Language code vary.

e.g. in the segment, contains:

https://www.domain.com/us/en/

https://www.domain.com/de/de/

https://www.domain.com/jp/ja/

 

But NOT contains any other referrers, e.g.

https://www.domain.com/us/en/compare/

https://www.domain.com/us/en/product/

https://www.domain.com/us/en/qa/3341234/

 

Thank you.

H

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

yuhuisg

Avatar

yuhuisg

yuhuisg

15-09-2020

Would this work?

Screenshot 2020-09-16 at 9.13.25 AM.png

evolytics_brian
@H_L - If the referring URL includes parameters or hash values beyond the pathname, would you want to include those in your segment (assuming all other criteria is met)?
H_L
No. Sorry forgot to mention, we give user's choice, they can choose any of the language/country combination, which means there are almost unlimited /us/en/, /de/en/, etc...
H_L
@evolytics_brian - emm, sorry I didn't get the point. what's the mean of "beyond the pathname"?
evolytics_brian
@H_L - I was referring to things like the query string (?) or hash (#). If you're filtering for a referring URL, and you want to exclude those from your criteria, you can't use "ends with" criteria. You'd have to use an option that specifies "contains" or "matches" instead. Though, you'll probably need to specify various values, for example: "/us/en/" OR "/us/en/?" OR "/us/en/#" OR "/us/en?" OR "/us/en#". Another option would be to update your data collection (implementation) to capture what you're looking for so creating a segment is much easier. For example, pull the {{loction}}/{{language}} value from the referrer and capture it in a prop as part of any necessary calls. Then your segment would just be "propN equal '/us/en'" and you're done.
H_L

@evolytics_brian, thank you for the further explanation. What we want, is to identify the traffic referred from respective country/language home page.

That's why we only want to filter out referrer from https://www.domain.com/us/en/,  but don't want to include https://www.domain.com/us/en/compare/

And, there will "unlimited" combination of country/language, as said before, we give user freedom to access any of the combination, e.g. /us/ja/, /br/ko/, /jp/br/, so it's nearly not possible to input all the values one by one.

The way you mentioned to implement, sorry I am not sure can make it or not.

 

But we used another way, exported all the referrer, counts the length, and filter. As all the https://www.domain.com/us/en/ contains same count of charaters and starts with same domain 😉

 

Thanks again for your inputs.

H_L
Hi @yuhuisg, thanks for reply, but it would not work, because there will be unlimited varies of /country/language combinations, e.g. /us/ja/, br/pt, br/zh, etc...

Answers (0)