Forum Moderators: martinibuster

Message Too Old, No Replies

Another way to host google adsense

         

castor_t

2:08 pm on Apr 21, 2010 (gmt 0)

10+ Year Member



I am trying to optimize my page for speed. Since the browser blocks processing other requests in a page if a javascript is found, I am wondering if I can move the adsense code to the bottom of the page.

In the sense, I will define a div tag at the position I want to host the ad, and at the bottom, I use javascript to fill the div with the google ad code.

Eg: <html>.... <div id="ad1"></div> ........
<script>document.getelementbyid("ad1").innerhtml = "Google Ad code here"</script></body></html>

1. Is this valid?
2. Will it help improve the performance of the page?

explorador

2:26 pm on Apr 21, 2010 (gmt 0)

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



I'll have to re-read the TOS but I kinda remember is not allowed to mod, play or move the code in such ways. There is a thread around here where some members began inserting the Adsense code via JS include, I mean external file, not directly inserted on the page to avoid increasing the weight of the file.

incrediBILL

3:16 pm on Apr 21, 2010 (gmt 0)

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



Using CSS to move all your AdSense to the end of the page *may* improve your page load but most likely it'll hurt your income since the visitor might glance over the page and leave before any ads are displayed as options.

Don't fix what isn't broken.

londrum

3:36 pm on Apr 21, 2010 (gmt 0)

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



i think i read a tip a long time ago that said if you want to target the ads better then you should surround it in the HTML code with the right words. so if you move the code to the end maybe your targeting will suffer.

i tried something like you are doing once and my earnings dipped a bit. not sure why, but i reckon it had something to do with the ad appearing before the rest of the page. a lot of people are still on dial-ups. if you make the ad appear slightly after the content, even if it's in the same location, then their eye will probably already focus on what they came to read rather than the ad