简体   繁体   中英

Regular expression for Google Analytics

I need to match these 4 urls in google analytics goal tracking using a regular expression:

  • /signup/findMe/recurring/confirm.html
  • /signup/findMe/oneTime/confirm.html
  • /dash/find/recurring/confirm.html
  • /dash/find/oneTime/confirm.html

I thought I could use some help from fellow experts here. Thanks in advance!

You could do it explicitly

^\/signup\/findMe\/recurring\/confirm\.html$|^\/signup\/findMe\/oneTime\/confirm\.html$|^\/dash\/find\/recurring\/confirm\.html$|^\/dash\/find\/oneTime\/confirm\.html$

But depending on the rest of your URL structure you could probably find a shorter expression.

Try a tool like http://regexr.com/ to practice.

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