Forum Moderators: martinibuster

Message Too Old, No Replies

Pass AdSense parameters with DFP tags

         

levo

9:58 pm on Apr 23, 2010 (gmt 0)

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



Well I didn't now this. You can use GA_googleAddAdSensePageAttr and GA_googleAddAdSenseSlotAttr to pass AdSense parameters to ad units that appear on a page - just like the good old AdSense tags.

Example:


<script type='text/javascript' src='http://partner.googleadservices.com/gampad/google_service.js'>
</script>
<script type='text/javascript'>
GS_googleAddAdSenseService("ca-pub-000000000");
GS_googleEnableAllServices();
</script>
<script type='text/javascript'>
GA_googleAddSlot("ca-pub-0000000", "####");
GA_googleAddAdSensePageAttr("google_alternate_ad_url", "http://www.domain.com");
GA_googleAddAdSensePageAttr("google_ad_type", "text");
GA_googleAddAdSensePageAttr("google_color_border", "FFFFFF");
GA_googleAddAdSensePageAttr("google_color_bg", "FFFFFF");
GA_googleAddAdSensePageAttr("google_color_link", "000000");
GA_googleAddAdSensePageAttr("google_color_text", "666666");
GA_googleAddAdSensePageAttr("google_color_url", "FF0000");
</script>
<script type='text/javascript'>GA_googleFetchAds();</script>


[google.com...]

Also there is a new "iframe tagging" in DFP, you have to join beta, but I got in in just 6 hours. The code is faster (ads load independently of page content) and you don't have to define ad units in the header.

[google.com...]

netmeg

11:13 pm on Apr 23, 2010 (gmt 0)

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



I'm gonna play with it in the next couple weeks.

sid786

2:27 am on Apr 24, 2010 (gmt 0)

10+ Year Member



Got a email from Adsense that they have upgraded my DFP account :-) Thanks, gonna explore this and chance the ad codes.