Make WordPress Core

Opened 3 years ago

Closed 14 months ago

#53205 closed defect (bug) (invalid)

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

Reported by: theteacher's profile theteacher Owned by:
Milestone: 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:

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.


Change History (3)

#1 @sabernhardt
2 years 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).

This ticket was mentioned in Slack in #core-media by antpb. View the logs.

14 months ago

#3 @antpb
14 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

As this seems to be happening outside of core, the Media team decided to close this issue. If this is still impacting, feel free to open it up again. Thanks for your report!

Note: See TracTickets for help on using tickets.