Current time: 12-16-2017, 09:02 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Page Speed and AdSense
08-24-2010, 03:41 PM
Post: #1
Page Speed and AdSense
Hey Everyone,

I am trying to avoid inline JavaScript as much as I can. I am also trying to have all my JavaScript execute after the onload event takes place. I know Google stated in their TOS that publishers are not allowed to modify their code. I have a few questions about this:

#1 - Can Google Adsense be loaded asynchronously without violating their TOS? When it is synchronous and inline, it may delay the body onload event from occurring.

#2 - Can Google Adsense be placed into a function that is called after the body onload event takes place without violating their TOS?

#3 - Can Google Adsense JavaScript be placed into an external JS file without violating their TOS?

#4 - Can Google Adsense be placed into a frame (with no content) as long as the frame is part of a bigger page (with content) without violating their TOS? I am thinking the frame src value could be set once the body onload event occurs.

#5 - How do you increase your page speed when dealing with ad systems such as Google without violating any rules?

Thanks in advance for any suggestions and / or information.

Sincerely,
Travis Walters
Find all posts by this user
Quote this message in a reply
08-24-2010, 09:12 PM
Post: #2
RE: Page Speed and AdSense
My best suggestion for dealing with Adsense is to wait.

Google mentioned at Velocity that they were in testing with a non-blocking version of the adsense code (just working out some final kinks). Surprised there wasn't more written about it - this is the only article I could find: http://www.theregister.co.uk/2010/06/23/..._overhaul/
Visit this user's website Find all posts by this user
Quote this message in a reply
08-25-2010, 01:14 AM (This post was last modified: 08-25-2010 01:14 AM by green-watch.org.)
Post: #3
RE: Page Speed and AdSense
Hey Patrick,

I posted a thread on the Google Adsense forum as well:
http://www.google.com/support/forum/p/Ad...8cd429eea1

It seems there is some sort of document.write code in the AdSense code that prevents the code from being placed after the body onload event occurs.

Concerning iframes, I found a few materials as well:
http://geoland.org/2007/01/adsense-in-iframe/
https://www.google.com/adsense/support/b...nswer=9997

The second link is from Google obviously. It contradicts the first link so I emailed Google about it to see if it is within their TOS. I checked out your link as well. It is nice to see Adsense is creating a non-blocking script. I just want to make sure I stay within their TOS because I do not want to lose my account. Even the Google Products is based through AdSense.

Sincerely,
Travis Walters
Find all posts by this user
Quote this message in a reply
08-25-2010, 01:49 AM
Post: #4
RE: Page Speed and AdSense
AFAIK!

(08-24-2010 03:41 PM)green-watch.org Wrote:  #1 - Can Google Adsense be loaded asynchronously without violating their TOS? When it is synchronous and inline, it may delay the body onload event from occurring.
Well, the root javascript is far futures expires, and all it seems to do is write an iframe which loads in async. - atleast thats what i gathered from the velocity video
(08-24-2010 03:41 PM)green-watch.org Wrote:  #2 - Can Google Adsense be placed into a function that is called after the body onload event takes place without violating their TOS?
adsense JS uses the evil document.write it has to be run exactly where the ad would be placed. - so the TOS is least of your worries here
(08-24-2010 03:41 PM)green-watch.org Wrote:  #3 - Can Google Adsense JavaScript be placed into an external JS file without violating their TOS?
See #2
(08-24-2010 03:41 PM)green-watch.org Wrote:  #4 - Can Google Adsense be placed into a frame (with no content) as long as the frame is part of a bigger page (with content) without violating their TOS? I am thinking the frame src value could be set once the body onload event occurs.
I believe this is possible, but the user is more likely to have the adsense JS in cache than your frame. Im not 100% clear if this is ok or not as per TOS, but your eCPM/targeting may be effected. test first.
(08-24-2010 03:41 PM)green-watch.org Wrote:  #5 - How do you increase your page speed when dealing with ad systems such as Google without violating any rules?
I deal with much much worse(in terms of speed) ad networks. to overcome blockage due to their crappy systems, i use DFP's experimental iFrame tagging.

Using DFP also has other benefits, you can sell ads any moment with option to fallback to adsense....

IMHO if you wanna use only adsense, your only way to mitigate the issue is to use source ordered content where the adsense code is lower than your important studd in the HTML. This does absolutely nothing to improve your pageload time, but it improves perceived latency.

cdnplanet.com: We help you select the right CDN
Visit this user's website Find all posts by this user
Quote this message in a reply
09-03-2010, 11:02 PM
Post: #5
RE: Page Speed and AdSense
hi Sajal,

I did some research on Adsense and blocking page load/rendering.
My findings (and solution) are documenten in a blog post: http://www.aaronpeters.nl/blog/non-block...page-speed

Maybe this helps you. Let me know!
Find all posts by this user
Quote this message in a reply
09-03-2010, 11:35 PM
Post: #6
RE: Page Speed and AdSense
Hi Aaron,

Very interesting research and solution. I used to use this trick when directly embedded other much crappier ad networks directly on my pages.

For this solution this just maybe violation of Adsense TOS... im not sure... maybe ill try to get my rep to confirm if this is ok.

This makes putting Adsense directly (using your method) more optimal than putting it via DFP if one doesnt need other DFP features...

-Sajal

cdnplanet.com: We help you select the right CDN
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)