r/web_programming • u/OpenBookExam • Nov 23 '16
Question: When I click on links within reddit, the url shows "out.reddit.com/[url here] briefly before taking me to my website. What is happening during this moment?
I work in IT but not in the programming world, nor web stuff. As I can figure, this is some kind of tracking mechanism that is reporting that either anonymously or directly report on the outflow traffic.
I'm assuming that metric is how Reddit makes it's money? I'm not quite sure what else would be happening other than that.
Can somebody confirm or explain what's happening otherwise? I figured this would be a good community to ask. Thanks!
5
Upvotes
1
u/EyeBluNCider Nov 23 '16
So to break it down from a programming perspective, they just have an event handler (which looks for a specific event, in this case an outbound link click), that collects data from the user link, the user itself, and the subreddit that they are clicking from. This event gets registered on the backend of the Reddit servers.
Here is some example code that Google Analytics uses, but the code that Reddit is using is much more complicated I'm sure, as it's customized to their needs.
This was a recent implementation (the last 8 months or so), /u/umbrae sheds some light on this in the reddit thread linked below. The things that they are looking for mainly are:
https://www.reddit.com/r/changelog/comments/49jjb7/reddit_change_click_events_on_outbound_links/?ref=share&ref_source=link