homepage Welcome to WebmasterWorld Guest from 54.145.243.51
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Google / Google AdSense
Forum Library, Charter, Moderators: incrediBILL & jatar k & martinibuster

Google AdSense Forum

    
Embedding Adsense Code with jQuery
Does it violate Adsense Program Policy?
kunwarbs

10+ Year Member



 
Msg#: 4473447 posted 7:50 am on Jul 7, 2012 (gmt 0)

I want to know if it is against the Adsense Program Policies to embed Adsense code using jQuery?

I want to append adsense code on my page dynamically after the first paragraph of content which can be done easily with jQuery.

Not too sure if it violates Adsense Program Policy?

 

levo

10+ Year Member



 
Msg#: 4473447 posted 8:03 am on Jul 7, 2012 (gmt 0)

Against the policy, and appending Adsense code wouldn't work.

incrediBILL

WebmasterWorld Administrator incredibill us a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



 
Msg#: 4473447 posted 8:17 am on Jul 7, 2012 (gmt 0)

Against the policy, and appending Adsense code wouldn't work.


How does embedding dynamically vs. static embedding violate the policy?

It shouldn't be a problem that I'm aware of but it probably bears re-reading the policies to make sure, but as long as you aren't altering the code or doing anything forbidden like pop-ups, floating ads, etc. it should be fine.

I dynamically embed AdSense but I do it server side, not in Javascript, but which method is used shouldn't really matter IMO.

The only way to really be sure is to ask an AdSense rep.

levo

10+ Year Member



 
Msg#: 4473447 posted 4:22 am on Jul 8, 2012 (gmt 0)

jQuery is client-side. Appending the code itself won't even work. You can append an iframe that has the adsense code, but using iframe is against policy. Also you can switch to the DFP async code and call 'gpt.js' after appending the ad code, but as always best thing to do is to contact Adsense first..

incrediBILL

WebmasterWorld Administrator incredibill us a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



 
Msg#: 4473447 posted 4:58 am on Jul 8, 2012 (gmt 0)

You may want to translate the German if you can't read it, but here's one supposed solution to using jQuery with AdSense which is a year old so who knows if it still works:
[software-solutions-juergens.com...]

Whether it's permitted or not is another question, but it seems technically doable.

levo

10+ Year Member



 
Msg#: 4473447 posted 5:18 am on Jul 8, 2012 (gmt 0)

That solution moves the adsense iframe. If the OP meant that, I stand corrected. Otherwise, Adsense code uses document.write and AFAIK it's not possible to append it with jquery.

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