Forum Moderators: martinibuster

Message Too Old, No Replies

Adsense doesn't serve right when others frame my content

adsense and foreign frames

         

oatleyd

8:23 pm on Dec 12, 2003 (gmt 0)

10+ Year Member



Wow, what timing! A googler pops by right when I find I'm having problems.

I run a news satire site, which is crawled daily by a satire site aggregator. When one of their clients sees a headline of mine that they like, and click on it, the site displays my content within a frame. It's mine, I still control everything inside it. But Google never serves real ads there, only my lame alternate. I suspect it is because the location.href isn't the one I signed up with, it's the one from the aggregator.

Is there anything I can do about this? I checked a few of the other sites crawled by the aggregator and the same thing happens to them. While I've never seen in print that I shouldn't attempt to break out of their frames, nobody else does it. Not even The Onion.

I definitely don't want to make the aggregator folks mad at me, they send me 5-10% of all the traffic I get!

So, where do I go from here? Anybody else got a thought on it?

Thanks for your help!

Dave Oatley

Blue_Fin

8:31 pm on Dec 12, 2003 (gmt 0)

10+ Year Member



I'm not sure that you can do anything about it. From the AdSense FAQ:

How do I optimize my site for the most relevant ads?
Our ability to target ads to your site depends on the content and structure of your site. Here are some basic guidelines for optimizing your site:

Place ads on pages that predominately contain text -- only text is used to determine a page's context.
If you have a robots.txt file, you'll need to remove it or add the following two lines to your robots.txt to allow our content bot to crawl your site:

User-agent: Mediapartners-Google*
Disallow:

If your site contains frames, be sure to run the ads in the frame with your page content.
Place ads on pages that don't require a login.
Place ads on content pages that don't change frequently.
By following these tips, we can better serve the most relevant AdWords ads on all of your content pages. If we are unable to crawl or understand the content on your site, we may serve public service ads or your specified Alternate Ads, for which you will not accrue any AdSense earnings.

One other thing to keep in mind, as well. If the site framing your site is displaying AdSense ads, having them on your site as well would cause them to be double serving and violating their own AdSense agreement.

daugava

8:41 pm on Dec 12, 2003 (gmt 0)

10+ Year Member



Actually, there's a special code you can use when your page is in a frame, it was given to me by AdSense tec support.

It's exactly like the original code, except there's an extra line:
google_page_url = document.location;

Andy

Jenstar

8:43 pm on Dec 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could use a frame breaker to eliminate this problem, but that could upset your referrer, which could be why others do this. You could also offer a link at the end of your article, something to the effect of "caught in a frame? Click here to remove" then use a frame breaker script which runs when the link is clicked. Perhaps others offer this as well, and you could then display regular AdSense ads on your pages, without having the referring frame issue.

Perhaps drop the tech team an email at AdSense. They might be able to offer additional suggestions for you. Explain why you prefer not to use a frame breaker from this referrer, or else they just might say to use on as their response ;)

If the site framing your site is displaying AdSense ads, having them on your site as well would cause them to be double serving and violating their own AdSense agreement.

Others have had their site framed with the referring site using AdSense, without any consequences. You have no control over someone framing your site. The referrer (the one who is framing the content) could perhaps run into problems, depending on how AdSense interprets running AdSense only on sites you have legal authority to do so - they could see it as no problem, or they could have an issue.

loanuniverse

8:44 pm on Dec 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Follow up on daugava's recommendation by contacting the adsense tech support and getting the new code.

Jenstar

8:45 pm on Dec 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's exactly like the original code, except there's an extra line:
google_page_url = document.location;

Thanks for the tip daugava!

oatleyd, do check with the AdSense team before you to this, so they have record of the fact you have permission to alter the AdSense code. Without permission, you could be in violation of their terms which says no changes to the code are allowed. Always better to be safe than sorry :)

oatleyd

8:52 pm on Dec 12, 2003 (gmt 0)

10+ Year Member



Thanks for the tips everybody. I just emailed Google. I'm glad it looks so resolvable.

I hope it won't be a problem that sometimes I'm framed and sometimes I'm not. If that snippet of code is the tweak, then it shouldn't matter.

Thanks again!

Dave

linear

9:09 pm on Dec 12, 2003 (gmt 0)

10+ Year Member



Wow, that's one for the FAQ/library.

jimbeetle

9:35 pm on Dec 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Jenstar stickied me just over a month or so ago when I recommended a bit of js as a framebreaker:

onload="if (self!= top) top.location = self.location"

We weren't sure if it would interfere with Adsense. Well, finally got Adsense up the other day and completely forgot I had that snippet in there.

It works, doesn't interfere at all. So if you do need one just stick it in the opening body tag and you're all set.

oatleyd

3:54 am on Dec 13, 2003 (gmt 0)

10+ Year Member



Just to cap this off, I did indeed get that code from Google. They replied in a single day, I was quite impressed. I popped the code in and immediately started serving google ads in my pages held captive in another's frame.

I won't take to busting out of the frame yet, I really want to keep my referrer happy. But I will certainly keep that code in my pocket for future use.

Thanks again, everybody!

-Dave

robho

5:06 am on Dec 13, 2003 (gmt 0)

10+ Year Member



The same thing happens (no ads) with any framed links (such as links from from Ask Jeeves, ajkids, about.com etc).

I'm surprised that fix isn't part of the standard ad code, as it affects essentially everybody (in differing proportions, just a few percent of impressions for me).

oatleyd

12:26 am on Dec 14, 2003 (gmt 0)

10+ Year Member



I've been running the new code all day and it's been a great change. Lots more hits. I always wondered why Google reported so fewer page views than my own web stats.

Get the code, it's definitely worth it.

-Dave