I'm using the Google Analytics Python API and I want to look for several partial string matches in a dimension. Something like the following works fine:
"filters": [
{
"dimensionName": "ga:pagePath",
"operator": "PARTIAL",
"expressions": ["substring1"]
},
{
"dimensionName": "ga:pagePath",
"operator": "PARTIAL",
"expressions": ["substring2"]
}
]
But I would like to combine these expressions, so it is easier to do similar to a lot of substrings. I saw that "expressions" will take regex, so I tried using the code below but it doesn't work. Can anybody help?
"filters": [
{
"dimensionName": "ga:pagePath",
"operator": "PARTIAL",
"expressions": ["substring1|substring2"]
}
]
I feel sure this is an easy question but I can't find an answer anywhere. I think I might be using the wrong method.