6

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.

Tomas
  • 57,621
  • 49
  • 238
  • 373
  • So I suspect your question is "how do I make embedded videos count?"...? – reto May 23 '14 at 11:56
  • 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'. https://developers.google.com/youtube/iframe_api_reference – mrbubbles May 24 '14 at 09:43
  • @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 May 25 '14 at 16:49
  • 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." -- https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player – graphicdivine May 29 '14 at 09:07
  • *"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 May 29 '14 at 09:58
  • e.g.: `src="//www.youtube.com/embed/r3bOc9hIuCg?rel=0&enablejsapi=1&origin=http://example.com"` – graphicdivine May 29 '14 at 10:15
  • @TMS When you saw full video does it count? i mean its does not showing count if your watching one or more times? What i want to tell u is when i load ur video first time its showing 301 same video i have added to mozilla nd still its 301 – Just code May 31 '14 at 13:07
  • http://www.youtube.com/watch?v=oIkhgagvrjI check this link. – padawan Jun 01 '14 at 12:39
  • @Justcode yes, when I saw the full video it does count – Tomas Jun 01 '14 at 19:35

2 Answers2

15

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.

Sebastián Espinosa
  • 2,123
  • 13
  • 23
  • Nope, that's not the reason. You may test it on the second video which has not reached the 300 views yet: www.youtube.com/v/bPnFnHSSO3E and you will see this is clearly not the core of the problem. – Tomas May 29 '14 at 08:50
  • @TMS not necessary false. It may not be the reason for your issue but the answer seems to be correct. Check this video http://www.youtube.com/watch?v=oIkhgagvrjI .. Under the comment section you will see people are complaining about view count freezing at different count. – Zerotoinfinity May 31 '14 at 11:40
  • THIS IS NOT AN ANSWER. **If I tell you that this is not an issue, because I tested it, then it is not an issue! The video http://www.youtube.com/v/bPnFnHSSO3E has 31 views and never got the missing views even after almost a week.** – Tomas Jun 01 '14 at 07:50
  • 1
    @TMS This **is** an answer, whether it's the solution to your problem is another story. Instead of all CAPing words and bolding things as if you're yelling you might want to put that effort into your OP and state that you've tested the ~300 count freeze and found that it is not related to your current issue... – subhaze Jun 01 '14 at 15:34
  • Just came around to check old answers, it looks like OP was under a lot of stress hahaha – Sebastián Espinosa Oct 28 '20 at 11:35
2

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.

Tomas
  • 57,621
  • 49
  • 238
  • 373