April 9, 2012

How to refresh/get new google adsense content?

Question by Zakukashi

I have a website where new content is updated via ajax when the user scrolls down. A kind of infinite page where as long as the user is scrolling new data comes. I have an adsense skyscraper code on the side but its at the top of the page and I would like to refresh when new content is loaded through Ajax so that I can then position it more down. Is this possible? and is this legal? Here is a close example of what I need: http://imgur.com/gallery
As you can see they have an ad on the right and everytime new content is updated via scroll a new ad is shown as well as keeping the older one in place.

Answer by Starx

This is not allowed. Read the TOS of adwords.

But a way to do it would be

var googleCode = '...your google code';
document.getElementById('googlediv').innerHTML(googlecode);

But, read this answer for more information.

...

Please fill the form - I will response as fast as I can!