I have a video service powered by YouTube API, but i encounter a problem: when video start playing browser throws an error to browser console:
https://googleads.g.doubleclick.net/pagead/ads?sdkv=h.3.0.0&url=example.com 403 (OK).
But when i test the same from localhost i can see ads on videos.
Basically, you're not allowed to place Google Ads in or around copyrighted material embedded in iFrames.
The YouTube API requires you to use an iframe to embed the YouTube video player. If you look at the Google Ads copyrighted material policies, you will find the following statement.
When a website displays someone else's website within a frame or window on their own site, this is considered framing content. Placing Google ads on such pages is strictly prohibited.
This video from the same page explains what they mean by "framing". They also simplify the whole message by saying:
If the content isn't yours or you don't have permission to use it, you can't monetize it with Google Ads.
If you want to advertise through an embedded YouTube video this page explains how to legally do that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With