问题描述
对于由包含列表中的单词的任何页面过滤的页面,我需要返回 Google Analytics 行为报告。
在高级过滤器中,我尝试使用包含管道的过滤器来分隔单词。
Include > Page > Containing > apple|orange|grape
然后我尝试了一个正则表达式近似来包含单词任何部分的一个或多个实例。
Include > Page > Regex > apple|orange|grape
Include > Page > Regex > (apple?|orange?|grape?)
Include > Page > Regex > (?:apple|orange|grape)
没有结果。
正则表达式应该匹配包含列表中任何单词的任何页面 URL。应包括复数和部分命中。文件夹目录是可变的。我正在寻找在任何地方包含该词的任何页面。
- www.example.com/apple
- www.example.com/my-apples
- www.example.com/something-variable-apples-and-oranges
- www.example.com/deals-on-apples www.example.com/category/oranges
- www.example.com/orange www.example.com/some/other/directory/oranges
- www.example.com/test/grape
- 等等...
解决方法
这个配置:
Include > Page > Containing > apple|orange|grape
您说它会返回所有结果,但理论上不会返回任何结果。
这个配置:
Include > Page > Regex > apple|orange|grape
它会做你想做的事情,即返回包含 apple
和/或 orange
和/或 grape
的 URL。
因此请检查设置是否确实如此。
[编辑]
注意:过滤模式中的数据长度字段限制为 256 个字符。