homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Google / Google AdSense
Forum Library, Charter, Moderators: incrediBILL & jatar k & martinibuster

Google AdSense Forum

adsense as fallback in iframe - policy violation?

 8:13 pm on Apr 14, 2013 (gmt 0)


In order to display ads we are dynamically placing an IFRAME tag from TF, VCM and other networks into our page using Javascript.

The fallback option (default) of all these iframe tags is Adsense.

1. Is that a policy violation because Google does not want Adsense to be placed in an iframe?

2. Will the performance get hurt because Adsense may not recognize the content on the parent page (and this would be helpful for contextual ads)?




 8:43 pm on Apr 14, 2013 (gmt 0)

Unless you have been authorized by Google, you are not allowed Adsense within an iframe.


 8:48 pm on Apr 14, 2013 (gmt 0)

So I am not allowed to place the Adsense code as a Fallback?


 8:48 pm on Apr 14, 2013 (gmt 0)



 9:00 pm on Apr 14, 2013 (gmt 0)

But as a competing ad in DFP SB that would be OK, isn't it?

And what if I place the Adsense code as a Fallback in a tag that is an embedded Javascript? (I have no control over the JS and they (TF or VCM) may use an iframe without my knowledge...)


 9:49 pm on Apr 14, 2013 (gmt 0)

It will not be okay.

Why don't you go and read the TOS/Policies like everyone else had to. The answer is in there if you bothered to read it.

If I have read you correctly, you are not allowed to embed Adsense into javascript anyway. And you should never place/allow your code where you have no control over it.


 5:53 am on Apr 15, 2013 (gmt 0)

@Lame_Wolf I had been reading the TOS several times and you are right in theory.

But what the TOS is saying is that Adsense as fallback and Adsense as a competing ad in DFP SB is a violation.

However, DFP's help&tutorial (a Google company) suggest you do exactly that.

And isn't adding Adsense as a fallback an approved common practice that even many people in this forum have recommended?


 6:57 am on Apr 15, 2013 (gmt 0)

@Lame_Wolf I had been reading the TOS several times and you are right in theory.

AdSense code may not be altered, nor may the standard behaviour, targeting or delivery of ads be manipulated in any way that is not explicitly permitted by Google. This includes but is not limited to the following: clicking Google ads may not result in a new browser window being launched, nor may Google ads be placed in an IFRAME

There is no "in theory" when it comes to the rules.
It also says that you are not allowed to have the adverts open up in a new window either. (But you are allowed if you are in China.)

IIRC it was DFP that allowed adverts to be opened in a new window, but that clashed with the Adsense TOS.

Just do whatever you want to do. You will anyway. You just want someone to say that it is okay to do, then when it goes t1ts-up, you'll blame someone else or use it as an excuse to Google when you get banned.

You need authorization from Google to be allowed Adsense in an iframe.


Publishers are encouraged to experiment with a variety of placements and ad formats to enhance the user experience and thereby maximize their earnings. However, altering the behavior, targeting, or appearance of AdSense ads without explicit approval from Google is generally prohibited. This behavior includes but is not limited to placing ad code in iframes in such a way that manipulates the standard behavior, targeting or delivery of ads. An iframe is an HTML tag used in web design that allows a webpage, picture, or graphic to be displayed in a frame within another page. Our policies have always disallowed the misuse of iframes, and recently we clarified our language to explicitly prohibit the misuse of iframes in our program policies.


 1:16 pm on Apr 15, 2013 (gmt 0)

you shouldn't want to put it in an iframe anyway, even if it was allowed, because you'll be changing the page's subject matter. it will just look at the content on the iframe page (which will probably be blank). so the ad targeting will be all wrong. your CTR will plummet, followed by your eCPM.


 1:50 pm on Apr 15, 2013 (gmt 0)

We asked Adsense for Policy Clarification and will post here.

We are bound by the agreement with Adsense and wanted to know if/how Adsense can be integrated into DFP and other ad-networks without violating the TOS.

(@Lame_Wolf we are not looking for excuses, nor are we doing whatever we want, we were just asking. Thanks nonetheless.)


 6:10 am on Apr 16, 2013 (gmt 0)

The reason its not allowed anymore is;

"... when an AdSense ad is served inside an iFrame, browser security features prevent the AdSense ad from detecting the page URL or domain to use for targeting. As a result, the most relevant ad is not served and ad revenue is lower than it could be."

Same goes for using the AdSense javascript code for DFP fallback, it creates an iframe. There is a workaround, but it requires explicit permission from AdSense.


 10:02 am on Apr 16, 2013 (gmt 0)

You can read google policy here "http://www.google.co.in/policies/technologies/ads/" and then decide to publish your contents.


 11:03 am on Apr 16, 2013 (gmt 0)

DFP tags (GPT) places Adsense Ads in Iframe... they even support passing parameters.


Is that the conclusion: Adsense as fallback to DFP ok (even in an iframe) and Adsense as fallback from other networks not ok?


 1:01 pm on Apr 16, 2013 (gmt 0)

Adsense as fallback to DFP ok

No, you can enable AdSense as a placement, but if you use the AdSense javascript code for fallback it can't detect the URL of the page.

Even for DFP, AFAIK, you can't use AdSense as Line item without explicit permission. You have to contact DFP support to enable "Line item level backfill" and contact Adsense to get permission to modify AdSense code.


 5:06 pm on Apr 16, 2013 (gmt 0)

@levo thanks, that helped a lot. The google publisher tags (GPT) will render into iframes:


So I assume that since DFP and Adsense are well integrated and even if the Adsense is displayed in iframe automatically Adsense will know the page (contextual) content due to the calling DFP tags (and origin of the page).

Meanwhile, I have spoken to Sales Reps of many ad networks yesterday and today and all said that placing Adsense as fallback is common practice used by thousands of publishers including major companies.

This fact does not make it right, of course...


 3:24 am on Apr 17, 2013 (gmt 0)

don't worry you won't get banned, i use adsense as fallbacks ads in tribal fusion almost 8 years now


 11:04 am on Apr 17, 2013 (gmt 0)

iframe ban is relatively new (almost 2 years) Just contact AdSense and explain your situation. They, probably, give you an OK and one line addition to your AdSense javascript code.


 11:21 am on Apr 17, 2013 (gmt 0)

I think I found a solution, although I am not 100% sure it fully complies with the TOS of Adsense. It is explained in DFP's help section:

Define "Inventory 1" and place an order from an ad-network. As a fallback in the ad-network do not use Adsense directly but use another Inventory of DFP (called "passback inventory"). This way you give back the control to the DFP server which then decides which ad to serve.
Enable Adsense for the passback inventory. Nowhere in the process you are using the "Adsense Code".

The only problem left is how Adsense will recognize the page it is displayed on. When using Adsense from a DFP tag that is placed in the HTML it should be able to recognize the content of the page. But if the Adsense is called from a DFP tag that is a fallback from an ad-network there is a chance that the parent page is not recognized and the content unknown... (DFP's GPT tags work with iframes behind the scene),


 4:11 pm on Apr 18, 2013 (gmt 0)

I got a response from Google Adsense. Please note that everybody may get a different response and you have to contact them directly to get approval.

"...What about other ad-networks that suggest that I place my Adsense code in their fall back option so that my Adsense ads would show as the default?"

A: "...that would be fine ... as long as you are staying within the limit of 3 ads per page"


 4:31 am on Apr 28, 2013 (gmt 0)

You could also use the Adzerk ad server which allows you to use Adsense ads as a fallback without putting them inside an iframe.


 5:23 pm on May 24, 2013 (gmt 0)

Just found this guide: https://support.google.com/adsense/answer/2694805?hl=en

It includes fixes for Adsense and GPT

Global Options:
 top home search open messages active posts  

Home / Forums Index / Google / Google AdSense
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved