Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Regex 谷歌分析正则表达式_Regex_Google Analytics - Fatal编程技术网

Regex 谷歌分析正则表达式

Regex 谷歌分析正则表达式,regex,google-analytics,Regex,Google Analytics,我需要使用正则表达式匹配google analytics目标跟踪中的这4个URL: /注册/findMe/recurrence/confirm.html /注册/findMe/oneTime/confirm.html /dash/find/recurrence/confirm.html /dash/find/oneTime/confirm.html 我想我可以从这里的同行专家那里得到一些帮助。提前谢谢 您可以明确地执行此操作 ^\/signup\/findMe\/recurring\/con

我需要使用正则表达式匹配google analytics目标跟踪中的这4个URL:

  • /注册/findMe/recurrence/confirm.html
  • /注册/findMe/oneTime/confirm.html
  • /dash/find/recurrence/confirm.html
  • /dash/find/oneTime/confirm.html

我想我可以从这里的同行专家那里得到一些帮助。提前谢谢

您可以明确地执行此操作

^\/signup\/findMe\/recurring\/confirm\.html$|^\/signup\/findMe\/oneTime\/confirm\.html$|^\/dash\/find\/recurring\/confirm\.html$|^\/dash\/find\/oneTime\/confirm\.html$
但根据URL结构的其他部分,您可能会找到一个较短的表达式


尝试一个类似于实践的工具。

根据您想要实现的目标,您只需查找包含confirm.html的其他URL即可。恐怕这对我来说行不通。谢谢你的回答!也许一个更简单的解决方案是在你想要跟踪的页面上添加一个自定义维度,然后在Google analytics中对其进行过滤。(.*)/find(.*)/(?!skipped)(.*)/confirm.html这帮我解决了问题。我还添加了/signup/findMe/skipped/confirm.html作为负匹配。它已经在GA上运行了整整一个月,URL匹配正确。谢谢大家!!