I have an internal request to add parameters to the url like ?from=productPage&searchTerm=[term] so that pages can be tracked for analytics. This feels like a weird smell to me, especially as the user can't change them to get any meaningful change. For example changing the searchTerm in the url doesn't change what's shown on the page, it just tells our analytics that the user used that term to get to the current page.

I'm also able to track these events in other ways by pushing to the GTM dataLayer.

It just felt weird to me to manipulate the url just for the sake of tracking, when that can be done in other ways, particularly when this adds no value to the user - of course other than us being able to make improvements based on analytics.

Just wondering if anyone had an opinion on this or could point me to why this is okay to do or why it might not be? Thanks

  • Weird approach. Use a cookie.
    – 3Dave
    Apr 9, 2020 at 20:45
  • I'm not sure how a cookie is going to be a good answer to this question. I'm going to push the analytics to the dataLayer in google tag manager and not use anything in the url at all
    – Brett East
    Apr 10, 2020 at 20:41

3 Answers 3


Additional parameters like that can cause many issues for users:

  • Users might face issues bookmarking a page from your site.
  • Users can't share urls as easily with friends or on social media.
  • If users do share urls including the additional parameters, it might skew your analytics results.
  • Deep linking might be an issue.
  • Some users might infer from the urls what your information architecture is. If it is polluted with additional parameters, that might make it difficult.

As the understanding of your context is limited, take this with a grain of salt.

  • Only one of these is valid. "If users do share urls including the additional parameters, it might skew your analytics results."
    – David
    Apr 8, 2020 at 19:29
  • 1
    @David This is the URL that Google gives me when I make a search. Not easily shareable without trimming the fat: https://www.google.com/search?sxsrf=ALeKk01-WI6y3SUefUfcYX0wcWU3zYSAUA%3A1586377233701&source=hp&ei=ETKOXuqWJ9D2swWx4qCgDw&q=user+experience&oq=user+experience&gs_lcp=CgZwc3ktYWIQAzIECCMQJzICCAAyAggAMgIIADIECAAQQzICCAAyBAgAEEMyAggAMgIIADICCAA6BQgAEIMBOgcIABCDARBDOgQIABAKSiYIFxIiMGc4N2c1Nmc5M2c2NWc1NWc1Nmc1M2c1NGc3MWc1OWc0N0obCBgSFzBnMWcxZzFnMWcxZzFnMWcxZzFnNWcxUMUEWNgPYNcQaAFwAHgAgAFYiAHWBpIBAjE1mAEAoAEBqgEHZ3dzLXdpeg&sclient=psy-ab&ved=0ahUKEwiq4_bb09noAhVQ- (+25 more characters) Apr 8, 2020 at 20:22
  • 1
    @David https://www.google.com/search?q=user+experience provides the same results, so all of the garbage I trimmed out is not relevant to the user. I don't think either of us can say none of the other parameters are used for tracking. Really I was just trying to say that Adnan Khan raised a valid point in that adding extra garbage to the URL when it's not needed makes link sharing more difficult for the user. Apr 8, 2020 at 20:31
  • 1
    @David I can think of a very recent example where I had to trim 25 characters off of a Google URL in order to paste it in a Stack Exchange comment ;) Apr 8, 2020 at 20:34
  • 1
    @David Getting off topic now, but yes, there are several tracking parameters in there (lines 39-69). Apr 8, 2020 at 20:47

Something to explain to analytics:

Query parameters in url's give users the opportunity to share or bookmark a page with the content they currently see, like a search result or a product in a chosen color for example.

And something to ask them:

If users visit a page from a url with query parameters and get different content than the session from where the url originates, how reliable or relevant can that information be for analytics?

  • True. My browser autocompletes almost every URL I type. Adding that tracking noise to the URL allows these everyday interactions to return unauthentic results. Apr 8, 2020 at 20:25

It's most odd. We have heard of the URL referrer you sometimes see. Usually in the form of


With Google Tag Manager, you can fire many Analytics tags without needing to append to the Query String.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.