简体   繁体   中英

Regex for Google Analytics Goal Conversion Funnel

Setting up Google Analytics Goal conversion funnel, concerned that Step 1 and Step 2 could fire twice, what is the proper Regex to discreetly identify these steps?

Current code:

Step 1 Homepage:

.*sitename.com

Step 2 Checkout:

.*subscribe|abc123

GOAL Thank You:

.*\/subscribe\/.*\/show

SUPPORTING INFORMATION:

Step 1 is Landing page: " https://sitename.com " followed by nothing

note: the regex needs to eliminate any interior pages from match ie. "homepage.com/productname" etc.

Step 2 is checkout page:

" https://accountname.chargifypay.com/subscribe/abc123 "

note: "abc123" is a static product number.

note: the URL MAY, but not always, be appended by event tags and ga tracking "?click=pre-order_countdown1&_ga=2.36488741.468562775.1549929587-14168953.1549612372"

GOAL is a thank you page:

It is unique in that it contains "/show", however, it also includes "/subscribe" and the product number "abc123" the same as in Step 2, however, it is not in the same order.

example:

" https://accountname.chargifypay.com/subscribe/khqjjnpp5sthnjxkn6pt6vqz/25706078/show/abc123 "

note: "khqjjnpp5sthnjxkn6pt6vqz/25706078" is randomly generated

note: the url is not appended by any variables - it ends after the static product number "abc123"

.*sitename.com
.*subscribe|abc123
.*\/subscribe\/.*\/show

Expect to match discreetly match step 1, 2, Goal - but cannot tell if the matching is too broad.

I expect to see traffic in the real-time --> conversions view of Google Analytics under the respective goal.

screenshot of Google Analytics Goal Detail Settings

screenshot of real-time conversion goal view in Google Analytics successfully showing traffic at GOAL

Found a pretty good tool for playing with URL Regex: https://www.regextester.com/93652

Step 1, no issue.

Step 2 seems to be a fixed URL, which can be filtered by: .*accountname.chargifypay.com/subscribe/abc123

Step 3 can be filtered by: . accountname.chargifypay.com/subscribe/. /show/abc123

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM