为具有不同GET参数的URL提供单独的点击计数器

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 or to a specfic search term or 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 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.

1 个赞

您现在可以看到上面的点击次数。这有帮助吗?

不,现在显示的点击次数确实是问题的证据:它们仅出现在指向基础 /search URL 的链接上。在 search/term/two 链接上没有显示点击次数。

我注意到这一点是因为我们在网站上进行了一项多语言调查。有一个 https://example.com/survey 链接,然后还有一些 https://example.com/survey?lang=af-za?lang=ar-ae 等链接。显然,我们从外部网站收集了实际信息,并且知道许多人以其他语言进行了调查,但帖子本身的点击计数器看起来很奇怪,给人一种欺骗性的外观。

2 个赞

明白了!所以,正如上面所演示的,

https://www.google.com/search

会得到一个点击计数器,但是

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

却不会。真有意思。@zogstrip,我们可以安排调查这件事吗?

3 个赞

@nbianca 你能把它加到你的列表里吗?

2 个赞

在执行链接查找时,它会选择第一个匹配的链接,而不考虑查询参数。我在这个 PR 中修复了该错误:

5 个赞

此主题在 3 天后自动关闭。不再允许回复。