The discussion is about Tracking Link Click Counters. putty wants to know if there’s a way to track which users have clicked a specific link within the community. JammyDodger suggests using the topic_links and topic_link_clicks tables in a Data Explorer query. putty shares a query that worked for some links, but not the one they want to track, which is within an event object. JammyDodger and putty further discuss the issue, noting that the link in question does not display a link counter next to it in the post.
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.
Is there a data explorer query to show which users clicked the link? I know anonymous clicks won’t show.
Hey Jammy!
Yes and no. The following Data Explorer 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.
-- [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