-1

I want to create a new view to filter several URIs there. Some URI like:

/edu/class

/edu/new-class

/edu/grades

which one is the right one:

\/edu/class|\/edu/new\-class|\/edu/grades

or

\/edu\/class|\/edu\/new\-class|\/edu\/grades

Thank you

Rahom
  • 1

1 Answers1

-1

Neither of these is correct. You would instead use a pattern like this:

/edu/(class|new-class|grades)

In this expression, the parentheses () contain a list of alternate matches, with each match separated by a pipe character |.

Alternately, you could also write

/edu/class|/edu/new-class|/edu/grades

... but the first example is easier to extend.

For Google Analytics, you can find more information on regular expressions here: https://support.google.com/analytics/answer/1034324?hl=en

Zak
  • 828
  • 4
  • 12