I'm trying to configure a Google Analytics filter that would exclude all pages matching ^/app$ and ^/app/.* apart from the following: /app/business-signup
It looks like Google doesn't support negative lookahead. I have found the 2 following relevant discussions, but I haven't managed to make it work. Google Analytics Regex include and exclude string without negative lookahead and RegExp alternative to negative lookahead match for Google Analytics
So far the following include filter is showing the most accurate results, but it's still excluding URLs that shouldn't be excluded.
^(/$|/app/business\-signup|/[^a][^p][^p][^/])
Expected excluded URLs:
- /app
- /app/
- /app/abc
- /app/abc?test=1
- ...
Expected included URLs:
- /app/business-signup
- /
- /?test=1
- /about
- /about/abc
- ...