# Tracking Link Click Counters

**URL:** https://meta.discourse.org/t/tracking-link-click-counters/360474
**Category:** Data & reporting
**Tags:** click-counter
**Created:** [April 4, 2025, 6:39pm UTC](https://meta.discourse.org/t/tracking-link-click-counters/360474 "2025-04-04T18:39:24Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![putty](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/putty/32/370902_2.png) [@putty](https://meta.discourse.org/u/putty)
#### Post date: [April 4, 2025, 6:39pm UTC](https://meta.discourse.org/t/tracking-link-click-counters/360474/1 "2025-04-04T18:39:24Z")

</div>

I know this is not the optimal way to track traffic, but I’m curious if there is a way to decipher who has clicked a link within our community. I assume the data is there since it is displayed via [link click counting](https://meta.discourse.org/t/understanding-link-click-counters/254552).

Is there a [data explorer](https://meta.discourse.org/t/32566?silent=true) query to show which users clicked the link? I know anonymous clicks won’t show.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [April 6, 2025, 4:21pm UTC](https://meta.discourse.org/t/tracking-link-click-counters/360474/3 "2025-04-06T16:21:44Z")

</div>

I think you can get this info from the `topic_links` and `topic_link_clicks` tables. 👍

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [May 5, 2025, 12:30pm UTC](https://meta.discourse.org/t/tracking-link-click-counters/360474/4 "2025-05-05T12:30:10Z")

</div>

Just to check back in, but was that enough of a breadcrumb for you? Did you manage to come up with the query you needed? 🤞

---

<div class="post-metadata">

### Author: ![putty](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/putty/32/370902_2.png) [@putty](https://meta.discourse.org/u/putty)
#### Post date: [May 8, 2025, 6:58pm UTC](https://meta.discourse.org/t/tracking-link-click-counters/360474/5 "2025-05-08T18:58:47Z")

</div>

Hey Jammy!  
Yes and no. The following [Data Explorer](https://meta.discourse.org/t/32566?silent=true) query worked, but unfortunately, the link I want to track is within an event object. The query worked for another link that was in the topic, but not the one I want to see.

```plaintext
-- [params]
-- topic_id :topic_id

SELECT 
  u.username AS "Username", 
  t.title AS "Topic Title", 
  tl.url AS "Clicked URL", 
  tlc.created_at AS reltime$clicked_at
FROM topic_link_clicks tlc
JOIN topic_links tl ON tlc.topic_link_id = tl.id
JOIN users u ON tlc.user_id = u.id
JOIN topics t ON tl.topic_id = t.id
WHERE tl.topic_id = :topic_id
ORDER BY tlc.created_at DESC

```

Or, maybe I’m being optimistic and of the 60 views, no one clicked on the link 😭

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [May 9, 2025, 5:21am UTC](https://meta.discourse.org/t/tracking-link-click-counters/360474/6 "2025-05-09T05:21:42Z")

</div>

Aah, that’s unfortunate. ☹ I’m not sure that’s something I’ve tested before. 🤔 Does that particular link get a link counter next to it in the post?

---

<div class="post-metadata">

### Author: ![putty](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/putty/32/370902_2.png) [@putty](https://meta.discourse.org/u/putty)
#### Post date: [May 9, 2025, 6:00pm UTC](https://meta.discourse.org/t/tracking-link-click-counters/360474/7 "2025-05-09T18:00:58Z")

</div>

I have since learned that it does not (just tested myself). TIL!

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [June 8, 2025, 6:01pm UTC](https://meta.discourse.org/t/tracking-link-click-counters/360474/8 "2025-06-08T18:01:26Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
