Why are views not counted if you embed a youtube iframe dynamically using jquery? -


in 1 of sites have thousands of visitors daily after 1 year, view count main video on start page still @ 26 views.

i wanted save load times, that's why providing image play icon on page. icon gets clicked, load youtube iframe via:

    $('#introimg').click( function() {          $(this).replacewith('<iframe width="759" height="426" src="https://www.youtube.com/embed/fdub8mivquk?wmode=transparent&amp;rel=0&amp;showinfo=1&amp;iv_load_policy=1&amp;modestbranding=1&amp;controls=2&amp;vq=large&amp;autoplay=1" allowfullscreen></iframe>');     }); 

i found one note here says:

views originate result of clicking on 1 of native player ui elements (either play button in control bar or on static player image) count towards incrementing views video.

is reason? because embed iframe autoplay true, there no click event.

would workaround replacewidth , trigger('click')? (which not work within iframe...)

related, different on stackoverflow:
youtube embedded video views not count
are youtube view counts incremented when using iframe player?

views don’t count

there few sources of views don’t count, , few things disqualify view counting.

views embedded video set autoplay may or may not count. has varied on years , there many conflicting reports available. in general, however, video set play automatically annoyance drives users away. allow them load video on own terms; don’t force on them. views creator of content typically count, limited extent. youtube has no way of knowing, example, whether you’re showing video other people on computer or not. however, refreshing page dozens of times inflate view count cause views not count. repeated views same user on short period of time typically don’t count. repeat views legitimate in cases, typically music videos , tutorials, take place in single session. if user reloading page each time view video, they’re trying game system , repeat views won’t count.

read more here


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -