简体   繁体   中英

Remove a part of the URL in Google Analytics

We are sourcing data in, but have a local language key in the url that we would like to strip out: /home?lang=en#!/wiki or /home?lang=en_US#!/wiki would like it to be read in as /home/wiki

Curious if this can be done on the Analytics side within a report / dashboard, or if there is a need to create a new variable and strip it out in the javascript.

Go to your view settings, enter "lang" in the "exclude parameters from url" box, this will make GA exclude the language settings. The bit after the hash mark should be dropped anyways, GA does not by default track the part after the fragment identifier.

So not in a report, but via the configuration of the GUI, without any programming (which might actually make the question off topic).

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