WordPress.org

Make WordPress Core

Opened 5 months ago

Last modified 3 weeks ago

#53205 new defect (bug)

No Views Recording in YouTube Analytics for Embedded Videos if using Lazy Load

Reported by: theteacher Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Media Keywords: close 2nd-opinion
Focuses: Cc:

Description (last modified by sabernhardt)

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

Change History (1)

#1 @sabernhardt
3 weeks ago

  • Component changed from General to Media
  • Description modified (diff)
  • Keywords close 2nd-opinion added

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).

Note: See TracTickets for help on using tickets.