简体   繁体   中英

Will Google Analytics treat url parameter as part of URL?

I need to incorporate my own parameters as part of url. (eg #student=DD&start=Date1&end=Date2). However, I am cerncerning about if I add my part to the url, will it mess up my google analytics tracking? Basically, now my url is something like -- MywebsiteUrl?userID=AAA#student=DD&start=Date1&end=Date2&utm_source=CC... .

What url Google analytics will track? is my website url -- MywebsiteUrl , or ``MywebsiteUrl?userID=AAA#student=DD&start=Date1&end=Date2`?

Thanks in advance!

Google Analytics will treat query parameters as part of the URL. However it will not treat #student=DD&start=Date1&end=Date2 as having query paramaters. As far as (native) Javascript and the GA tracking code is concerned the URL ends after the fragment identifier ( # ).

So your complete example

MywebsiteUrl?userID=AAA#student=DD&start=Date1&end=Date2&utm_source=CC

you will get MywebsiteUrl?userID=AAA . If the userID parameter contains personally identifiable information you need to remove it to conform to Google's terms of service. You can use a filter or the exclude parameters-box in the view settings.

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