Does Google Analytics Support \Q ... \E in Filters Using Regular Expressions?

I am a consultant currently working on a project auditing and optimizing an organization's Google Analytics setup. They have several views in place aiming to filter specific areas of their site based on Request URI and are using regular expressions to do. In the regex, the setup is the following, for exclusion filters.

\Q/homepage_\E|\Q/audience_area_2/\E|\Q/audience_area_3/\E

The Question
Does Google Analytics support the \Q ... \E setup in regex? It appears it does not as traffic from areas they're aiming to exclude is very much being reported, but perhaps I'm missing something.

Thanks in advance!

2 answers

  • answered 2020-07-29 19:21 Ryszard Czech

    According to RE2 syntax documentation, \Q and \E operators are supported:

    Escape sequences
    \Q...\E literal text ... even if ... has punctuation

  • answered 2020-07-29 19:26 Michele Pisani

    \Q...\E is supported, you can try it in the filter of a report, however if you want include or exclude traffic with filter at view level you have the possibility to indicate Include or Exclude and the desired pattern, so you don't need to use those specific operators.