Using link click counter to count YouTube Onebox play?

It would be nice to see the number of times a YouTube onebox embed had been clicked on (“played”).

Considering that YouTube onebox embeds in Discourse are just simple links.

e.g.
YouTube

Which embeds as:

Note the title of the video is actually a link and if clicked goes to YouTube.
I believe both of the following should be counted:

  • Clicking the Play button in the centre
  • Clicking the Title link

A simple mock up would be:

Although this wouldn’t be the actual count of plays and people might replay etc. it would be a good indicator.

5 Likes

Sure @techapj can you look into how difficult this would be? Not sure if Oneboxer being an external gem (I kind of regret this tbh) complicates matters.

1 Like

Just got the “Good Share” badge for this post.

Shared a post with 300 unique visitors

With only 3 likes - it makes me think people are coming here for other reasons than this feature though.

I’m still very interested in this feature.

1 Like

I like your idea a lot.

Related: I looked at Google tag manager recently and saw the following;

Published on 8 Sep 2015In this weeks video we’ll look at how to track Embedded YouTube Videos with Google Tag Manager. We can do this by implementing a custom HTML tag which listens for the interactions on the video. This allows us to monitor events such as a user only watching 25% or 75% of the video, as well as how many times they hit play or pause. We can then visualise this data in Google Analytics. Please see our first link if you want the written tutorial used in the video, enjoy!

1 Like

This is fairly complicated and quite minor since majority of people just play inline. count of plays would be way more interesting but that is even more complicated.

4 Likes

Just replying to +1 on this feature.

When people have messed up their embed and leave a link for video sometimes the numbers vary wildly and it’s a really good indication to my users of popular/unpopular content which is lost if you can only see the preview.

1 Like