动态 URL 目标设置的正则表达式
我已经尝试使用此正则表达式在 GA 中设置一个目标 2 天,但我无法理解它......
URL 格式如下:
/purchase.php?cDd=1&transaction_id=xxxxxxx&verify=xxxxxxxxxxxxxxxx=&method=creditcard&type=purchase
transaction_id= 填充了数字的九位 verify=
由一串数字、大写和小写字母组成
基本上我只想匹配以 &method=creditcard&type=purchase
结尾的网址>
我尝试只输入 &method=creditcard&type=purchase
但它也检索其他 URL。
I have tried to work this RegEx to set up a goal in GA for 2 days, but I cannot get my head around it...
The URL format is like this:
/purchase.php?cDd=1&transaction_id=xxxxxxx&verify=xxxxxxxxxxxxxxxx=&method=creditcard&type=purchase
transaction_id= is populated with a sept of numbersverify=
is populated by a string of numbers, letters in both caps and lower case
Basically I would like to only match URLs which finish by &method=creditcard&type=purchase
I have tried to just put &method=creditcard&type=purchase
but it does retrieve other URLs too.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在正则表达式末尾放置一个
$
符号。这样你就强制只匹配以
&method=creditcard&type=purchase
结尾的 url,否则
就可以了
Put a
$
sign at the end of your regex.This way you enforce to only match url's that end with
&method=creditcard&type=purchase
or
would do the trick
对于任何动态 URL
For any dynamic URL