为 Google Analytics 中的转化跟踪目标 - URL 设置正确的 REGEX
Setting up correct REGEX for conversion tracking target-URL in Google Analytics
来自挪威的问候!
我是在 Google 分析中设置 REGEX 的新手,非常感谢您的帮助! :)
我想跟踪从我的网站发送的活动表单(如收件人网址),但我需要设置一个正则表达式以跟踪我网站上所有活动的响应。
需要跟踪这些字符串(以及未来类似的一次):
https://www.domain.no/**Campaigns**/MYcampaignname?**mode=received&formid**=thisand093that123
https://www.domain.no/**Campaigns**/Another-campaign-name?**mode=received&formid**=76280&goback=https%3a%2f%2fwww.domain.no%2fCampaign
https://www.domain.no/**Campaigns**/Name-of-This-campaign?**mode=received&formid**=76283
我在 GA 中尝试了几种不同的正则表达式,但我没有让它们工作..
我试过的一些:
/Campaigns/.?mode=received&formid=.
/Campaigns/([A-Z]+[a-z]+[0-9]+)?mode=received&formid=[^/]
非常感谢您的帮助!
使用
^/Campaigns/([\w-]+)\?mode=received&formid=([^/]+)
说明
MODE
EXPLANATION
^
the beginning of the string
/Campaigns/
'/Campaigns/'
(
group and capture to :
[\w-]+
any character of: word characters (a-z, A-Z, 0-9, _), '-' (1 or more times (matching the most amount possible))
)
end of
?
'?'
mode=received&formid=
'mode=received&formid='
(
group and capture to :
[^/]+
any character except: '/' (1 or more times (matching the most amount possible))
)
end of
来自挪威的问候!
我是在 Google 分析中设置 REGEX 的新手,非常感谢您的帮助! :) 我想跟踪从我的网站发送的活动表单(如收件人网址),但我需要设置一个正则表达式以跟踪我网站上所有活动的响应。
需要跟踪这些字符串(以及未来类似的一次):
https://www.domain.no/**Campaigns**/MYcampaignname?**mode=received&formid**=thisand093that123 https://www.domain.no/**Campaigns**/Another-campaign-name?**mode=received&formid**=76280&goback=https%3a%2f%2fwww.domain.no%2fCampaign https://www.domain.no/**Campaigns**/Name-of-This-campaign?**mode=received&formid**=76283
我在 GA 中尝试了几种不同的正则表达式,但我没有让它们工作.. 我试过的一些:
/Campaigns/.?mode=received&formid=.
/Campaigns/([A-Z]+[a-z]+[0-9]+)?mode=received&formid=[^/]
非常感谢您的帮助!
使用
^/Campaigns/([\w-]+)\?mode=received&formid=([^/]+)
说明
MODE | EXPLANATION |
---|---|
^ | the beginning of the string |
/Campaigns/ | '/Campaigns/' |
( | group and capture to : |
[\w-]+ | any character of: word characters (a-z, A-Z, 0-9, _), '-' (1 or more times (matching the most amount possible)) |
) | end of |
? | '?' |
mode=received&formid= | 'mode=received&formid=' |
( | group and capture to : |
[^/]+ | any character except: '/' (1 or more times (matching the most amount possible)) |
) | end of |