简体   繁体   中英

Google Analytics Funnel Regular Expression

I started to use GA recently. Now I'm creating funnels and my destination URL contains parameters that I want to replace with regular expressions.

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:
/buySuccess.jsp;jsessionid=72E8952C431483DA26AE7D33E3FE4EA7?f=133381&id=1543845&mt=VDEO

  • "jsessionid" is the session id that changes with every session.
  • "f" stands for frontend, which is fixed.
  • "id" is the id of the purchased media.
  • "mt" is for type of media, in this case a Video.

I believe if I replace "jsessionid" and "id", that will give me the total of downloads my videos have had.

So, using regular expressions, I've thought of this:
/buySuccess.jsp;jsessionid= ?f=133381&id= &mt=VDEO ?f = 133381&id = &mt = VDEO

Any suggestions?

Tks!

Escape the question mark and replace the metacharacter \\w with one that matches any alphanumeric string. Try this:

/buySuccess.jsp;jsessionid=[a-zA-Z0-9]+\?f=133381&id=\d+&mt=VDEO

Demo at http://regexr.com/38os9

Note: regexr forces you to escape forward slashes but the expression above will work fine.

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