Hacker News new | past | comments | ask | show | jobs | submit login

Google AdSense FAQ:

Q: Is it violating program policy if I place ads on iframe webpages in my software?

A: Yes, it does violate our policies. Firstly, you’re not allowed to place ads in a frame within another page. Exceptions to our policies are permitted only with authorization from Google for the valid use of iframes.[1]

[1] https://support.google.com/adsense/answer/3394713?hl=en




That's different. Yes, their policy is that you cannot have a page of your site that you load in an iframe, then put ads into that child page. This is to prevent fraud and viewability issues like loading 100 invisible child pages in the background to rip off ad networks.

None of that has to do with how ads from their network are actually rendered when you use their tags. Adsense/DFP tags do use iframes for almost everything unless explicitly set to load directly on page, usually for legacy code or rich-media. The relevant help article is here: https://support.google.com/dfp_premium/answer/183282

"...SafeFrame is supported in DFP and enabled by default when using Google Publisher Tags. Reservations serve into SafeFrames by default, but you can disable this setting...and use friendly iframes instead, if needed.... Some creatives, such as expandable ads or creatives that access your page’s DOM elements, might not render correctly in SafeFrames or other cross-domain iframes. We recommend updating these creatives to make them SafeFrame-compatible, in order to retain SafeFrame’s security benefits. If this is absolutely not an option, there are a few things you can do to allow reservation ads of this type to render properly..."


To add to this, there's also a slow transition towards safe frames [1] that allows for better protection than friendly frames by restricting all page-iframe communication to a specific API.

[1] https://www.iab.com/guidelines/safeframe/




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: