My site has user profiles that are accessible via URLs that look like this: www.domain.com/profile/123/...
. I want to show users page view statistics of their profiles, but need to be able to do wildcards.
For example, this works:
filters=ga:pagePath==/profile/123/
The problem is that there are potentially other URI segments that follow /profile/123/
. I want to do something like this (does not work):
filters=ga:pagePath==/profile/123/*
Suggestions?
You can also track data from smaller geographical regions such as specific cities, states, or individual countries. To view statistics from these types of regions, use the following Include filter: Filter Type: Custom filter > Include. Filter Field: City (you can also use Region or Country)
Search & Replace: This is a simple filter that you can use to search for a pattern within a field and replace the found pattern with an alternate form. Advanced: This type of filter allows you to build a field from one or two other fields.
Use the 'Contains a match for the regular expression' operator (~) from the Dimension Filters.
filters=ga:pagePath=~/profile/123/*
This will work:
filters=ga:pagePath=~/profile/123/
To do /*/view/*
(as per @VinnyG’s comment), this should work:
filters=ga:pagePath=~/[^/]+/view/
I'm assuming you want to match one (and only one) directory before /view/
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With