[英]Google Analytics Funnel Regular Expression
I started to use GA recently. 我最近开始使用GA。 Now I'm creating funnels and my destination URL contains parameters that I want to replace with regular expressions. 现在,我正在创建渠道,目标URL包含我想用正则表达式替换的参数。
Maybe it helps if I mention that I manage a mobile site that sells content for cell phones: ringtones, wallpapers, games, etc. These funnels will measure how many downloads each type of content have had. 如果我提到我管理一个销售手机内容的手机网站(例如铃声,壁纸,游戏等),可能会有所帮助。这些渠道将衡量每种内容的下载量。
This is the URL: 这是URL:
/buySuccess.jsp;jsessionid=72E8952C431483DA26AE7D33E3FE4EA7?f=133381&id=1543845&mt=VDEO /buySuccess.jsp;jsessionid=72E8952C431483DA26AE7D33E3FE4EA7?f=133381&id=1543845&mt=VDEO
I believe if I replace "jsessionid" and "id", that will give me the total of downloads my videos have had. 我相信,如果我替换“ jsessionid”和“ id”,那将使我的视频获得总下载量。
So, using regular expressions, I've thought of this: 因此,使用正则表达式,我想到了这一点:
/buySuccess.jsp;jsessionid= \\w+ ?f=133381&id= \\d+ &mt=VDEO /buySuccess.jsp;jsessionid= \\ w + ?f = 133381&id = \\ d + &mt = VDEO
Any suggestions? 有什么建议么?
Tks! Tks!
Escape the question mark and replace the metacharacter \\w with one that matches any alphanumeric string. 转义问号,并将元字符\\ w替换为与任何字母数字字符串匹配的元字符。 Try this: 尝试这个:
/buySuccess.jsp;jsessionid=[a-zA-Z0-9]+\?f=133381&id=\d+&mt=VDEO
Demo at http://regexr.com/38os9 演示位于http://regexr.com/38os9
Note: regexr forces you to escape forward slashes but the expression above will work fine. 注意:regexr会强制您转义正斜杠,但是上面的表达式可以正常工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.