this post was submitted on 27 Mar 2025
928 points (91.1% liked)

Fediverse memes

1181 readers
188 users here now

Memes about the Fediverse

Other relevant communities:

founded 6 months ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 0 points 5 days ago (4 children)

I don't think that is true, iirc you can't track simple clicks on HTML a elements.

[–] [email protected] 2 points 1 day ago

with javascript you can just use an onclick.

[–] [email protected] 9 points 5 days ago

With JavaScript you can track your precise mouse cursor movements. Many analytics products even offer that as an "session replay" feature to check how a user moved their mouse, or to see heatmaps of where people are pointing to.

Tracking actual clicks is obviously much more trivial.

[–] [email protected] 5 points 5 days ago (1 children)

Apart from using JavaScript, there’s also a way to track links in HTML

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#ping

[–] [email protected] 3 points 5 days ago

TIL, thanks for sharing

[–] [email protected] 2 points 5 days ago

Yes, you absolutely can, and it's super simple. Click listeners are one of the most basic things you can do with JavaScript, and there's nothing special about a elements that would make them not work. The only way to stop it from the user's side is to disable JavaScript in their browser, but that comes with the downside of the majority of websites and apps just plain not working anymore.