6
votes

Many resources claim that views of embedded youtube video DO count, if it there is no autoplay. But it doesn't count actually, and there is no autoplay! The code is:

<iframe width="420" height="315" 
        src="//www.youtube.com/embed/bPnFnHSSO3E?rel=0" 
        frameborder="0" allowfullscreen>
</iframe>

The views of the video using this code DO NOT COUNT even if I play the whole embedded video till the end! The views are incremented if watched directly on youtube, so it is not the "300 views problem".

I have tried to add the enablejsapi option, but it doesn't work as well.

<iframe width="420" height="315" 
        src="//www.youtube.com/embed/bPnFnHSSO3E?rel=0&enablejsapi=1" 
        frameborder="0" allowfullscreen>
</iframe>

The rel=0 option is not affecting that either.

I have found several resources mentioning the issue but without clear solution:

I was testing this in Chrome 34.0.1847.131 m (current version) in such a way that I had the video open on youtube, reloaded it, and the view count was one higher. Then I loaded the embedded videos in another tab, ran them till the end several times (sometimes I even tried to use private window and different IPs using two different proxies), and I reloaded the window on youtube - the view count was still only +1 higher, not +3 or +4 higher as it should be.

2
So I suspect your question is "how do I make embedded videos count?"...?reto
Also note this from the iFrame API documentation: 'Note: A playback only counts toward a video's official view count if it is initiated via a native play button in the player'. developers.google.com/youtube/iframe_api_referencemrbubbles
@mrbubbles yes, this is what Youtube says, but it's not true. There is no autoplay in my example, video was run manually using the play button.Tomas
Does adding the origin parameter to the URL make any difference? "As an extra security measure, you should also include the origin parameter to the URL, specifying the URL scheme (http:// or https://) and full domain of your host page as the parameter value. While origin is optional, including it protects against malicious third-party JavaScript being injected into your page and hijacking control of your YouTube player." -- developers.google.com/youtube/…graphicdivine
"Does adding the origin parameter to the URL make any difference?" - what do you mean? Can you provide an example? I just use the code generator which is under the video (Share > Embed)Tomas

2 Answers

15
votes

Your video have 301 views, its a security system for the views, look:

When a video reach 301 views, the counter stop (is still counting on background) but youtube checks for the authenticity of the views, this takes a couple of days, remember, youtube works on a lot of servers at the same time, so they need to gather all the views metadata and aprove it (because a lot of people use robots to get a lot of views).

After aproval the view count goes back to normal.

Hope it helps

PD: sorry for the bad english.

2
votes

The only way to work around this I found was to check the Use old embed code option:

enter image description here

so it generated the old embed code with <object>, <embed> and <param>:

<object width="420" height="315"><param name="movie"
value="//www.youtube.com/v/bPnFnHSSO3E?version=3&amp;hl=en_US"></param><param
name="allowFullScreen" value="true"></param><param name="allowscriptaccess"
value="always"></param><embed
src="//www.youtube.com/v/bPnFnHSSO3E?version=3&amp;hl=en_US"
type="application/x-shockwave-flash" width="420" height="315"
allowscriptaccess="always" allowfullscreen="true"></embed></object>

This way, the views of embedded video DO count! (tested in Chrome 34.0.1847.131 m).

As noted in the youtube documentation, this code only supports Flash, not HTML5.

This is not a good solution though! But I don't know of any better now.