# Separate click counters for URLs with different GET params

**URL:** https://meta.discourse.org/t/separate-click-counters-for-urls-with-different-get-params/193404
**Category:** Feature
**Tags:** completed, click-counter
**Created:** [June 10, 2021, 2:34pm UTC](https://meta.discourse.org/t/separate-click-counters-for-urls-with-different-get-params/193404 "2021-06-10T14:34:11Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![mbauman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mbauman/32/139835_2.png) [@mbauman](https://meta.discourse.org/u/mbauman)
#### Post date: [June 10, 2021, 2:34pm UTC](https://meta.discourse.org/t/separate-click-counters-for-urls-with-different-get-params/193404/1 "2021-06-10T14:34:12Z")

</div>

If I have a link to a page in addition to that same page with customized GET params, it seems link counting for the GET-parameterized versions get folded into the bare URL. For example, I can link to [Google’s search page](https://www.google.com/search) or to a specfic [search](https://www.google.com/search?q=search) [term](https://www.google.com/search?q=term) or [two](https://www.google.com/search?q=two). I would count those links as all very distinct. It seems that — at least on our site, at least for a different webpage — clicks on the `?q=` links count as clicks onto the non-parameterized URL and none of the parameterized versions show a click counter (not even a unified one as another link to the [base URL](https://www.google.com/search) does).

This post is something of a trial of a MWE; If you’re reading this please try clicking on some of the links above. I’m curious if this the behavior we’re seeing on our site.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [January 17, 2022, 9:48pm UTC](https://meta.discourse.org/t/separate-click-counters-for-urls-with-different-get-params/193404/2 "2022-01-17T21:48:54Z")

</div>

You can now see click counts above. Does that help?

---

<div class="post-metadata">

### Author: ![mbauman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mbauman/32/139835_2.png) [@mbauman](https://meta.discourse.org/u/mbauman)
#### Post date: [January 18, 2022, 3:36pm UTC](https://meta.discourse.org/t/separate-click-counters-for-urls-with-different-get-params/193404/3 "2022-01-18T15:36:38Z")

</div>

No, the click counts that now appear are indeed evidence of the problem: they’re only appearing on the links to the base `/search` URL. There are no click counts appearing on the search/term/two links.

I noticed this because we conducted a multilingual survey on our site. There was an `https://example.com/survey` link, and then also a handful of `https://example.com/survey?lang=af-za` and `?lang=ar-ae` and such. Obviously we collected the actual information from the external site and know that many took the survey in other languages, but the click counters on the post itself looked quite funny and gave a deceiving appearance.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [January 18, 2022, 5:08pm UTC](https://meta.discourse.org/t/separate-click-counters-for-urls-with-different-get-params/193404/4 "2022-01-18T17:08:57Z")

</div>

I see! So, as illustrate above,

`https://www.google.com/search`

gets a click counter but

`https://www.google.com/search?q=search`

does not. Interesting. @zogstrip can we slot this for investigation?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [January 19, 2022, 10:11am UTC](https://meta.discourse.org/t/separate-click-counters-for-urls-with-different-get-params/193404/5 "2022-01-19T10:11:34Z")

</div>

@nbianca can you add this to your list?

---

<div class="post-metadata">

### Author: ![nbianca](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nbianca/32/157984_2.png) [@nbianca](https://meta.discourse.org/u/nbianca)
#### Post date: [February 22, 2022, 12:26pm UTC](https://meta.discourse.org/t/separate-click-counters-for-urls-with-different-get-params/193404/6 "2022-02-22T12:26:00Z")

</div>

When we performed the link lookup, it selected the first link that matched without looking at the query parameters. I fixed the bug in this PR:

[https://github.com/discourse/discourse/pull/15969](https://github.com/discourse/discourse/pull/15969)

---

<div class="post-metadata">

### Author: ![nbianca](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nbianca/32/157984_2.png) [@nbianca](https://meta.discourse.org/u/nbianca)
#### Post date: [February 26, 2022, 6:00am UTC](https://meta.discourse.org/t/separate-click-counters-for-urls-with-different-get-params/193404/7 "2022-02-26T06:00:07Z")

</div>

This topic was automatically closed after 3 days. New replies are no longer allowed.
