[wp-trac] [WordPress Trac] #53205: No Views Recording in YouTube Analytics for Embedded Videos if using Lazy Load

WordPress Trac noreply at wordpress.org
Sat Oct 2 21:04:23 UTC 2021


#53205: No Views Recording in YouTube Analytics for Embedded Videos if using Lazy
Load
-------------------------------+------------------------------
 Reporter:  theteacher         |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Media              |     Version:
 Severity:  normal             |  Resolution:
 Keywords:  close 2nd-opinion  |     Focuses:
-------------------------------+------------------------------
Changes (by sabernhardt):

 * keywords:   => close 2nd-opinion
 * component:  General => Media


Old description:

> I don't know why this started happening because everything was normal
> before. I am using WP-Rocket for Lazy Load the Images and YouTube
> Embedded Videos. Most of the videos were embedded using the Video Watch
> Link using YouTube Video Block in WordPress.
>
> The problem is when we see the YouTube Analytics - Reach - Traffic Source
> - External then if the Lazy Load is Enable for iframe and Videos then the
> YouTube doesn't count the views.
>
> I notified this to WP-Rocket and they opened a new ticket:
>
> https://github.com/wp-media/wp-rocket/issues/2757
>
> I am writing this because after upgrading to Wordpress 5.7.2; you said
> that Lazy Load is enabled by default for iframes.
>
> So my question is how we can correct this issue? Will Wordpress 5.7.2.
> Lazy loads the embedded YouTube Videos using the Video URL and Wordpress
> YouTube Block?
>
> If that is not possible then should I embed all the videos again using
> the iframe share code instead of video url?
>
> I am concerned about this because the new Core Web Vitals update. If not
> lazy loading images and videos then it will surely effect the page speed
> which will further effect the position of website in Google Search
> Results.
>
> Regards

New description:

 I don't know why this started happening because everything was normal
 before. I am using WP-Rocket for Lazy Load the Images and YouTube Embedded
 Videos. Most of the videos were embedded using the Video Watch Link using
 YouTube Video Block in WordPress.

 The problem is when we see the YouTube Analytics - Reach - Traffic Source
 - External then if the Lazy Load is Enable for iframe and Videos then the
 YouTube doesn't count the views.

 I notified this to WP-Rocket and they opened a new ticket:

 https://github.com/wp-media/wp-rocket/issues/2757

 I am writing this because after upgrading to WordPress 5.7.2; you said
 that Lazy Load is enabled by default for iframes.

 So my question is how we can correct this issue? Will Wordpress 5.7.2.
 Lazy loads the embedded YouTube Videos using the Video URL and Wordpress
 YouTube Block?

 If that is not possible then should I embed all the videos again using the
 iframe share code instead of video url?

 I am concerned about this because the new Core Web Vitals update. If not
 lazy loading images and videos then it will surely effect the page speed
 which will further effect the position of website in Google Search
 Results.

 Regards

--

Comment:

 Hi and welcome to Trac!

 Using the default WordPress lazy loading, which adds `loading="lazy"` to
 iframe elements, I was able to see both view counts on an unlisted video
 at the times I played it.

 So this may be a problem with WP Rocket's lazy loading feature (and not
 core WordPress).

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53205#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list