Adding Referral Ad Units in Wordpress Template

I'm going to add a Google Adwords referral unit in my template. The result will be visible on the top right, in the header. Whenever someone purchases adwords services through this link, I will receive $20 in my Adsense account. It's not much, but it's worth having up there and I like to remind my readers of Adwords as a way for new bloggers to promote their site and get some initial traffic going.

First I open Adsense Setup, as described previously, and choose Referrals instead of Ads. On the next page I choose the 180×60 pixel size Increase traffic… ad.

Now, in Wordpress Theme Editor, I go to headerads.php, and just like before, I just copy-paste the ad code to the editor. This time though, I'm removing both of the dummy ads and putting one big ad instead. So the code ends up looking like this (actually, the following is the entire final code for headerads.php):

<script type="text/javascript"><!–
google_ad_client = "pub-0378921240456421″;
google_ad_width = 180;
google_ad_height = 60;
google_ad_format = "180×60_as_rimg";
google_cpa_choice = "CAAQvIalgwIaCK3N9LIGSvj7KPTj6n4″;
google_ad_channel = "7843962083″;
//–></script>
<script type="text/javascript" src=
"http://pagead2.googlesyndication.com/pagead/show_ads.js">

</script>

<div id="topbar">
<img src="<?php bloginfo('stylesheet_directory'); ?>
/images/topbar.gif" alt="" />

<div class="topbartext">
      

<script type="text/javascript"><!–
google_ad_client = "pub-0378921240456421″;
google_alternate_color = "545454″;
google_ad_width = 728;
google_ad_height = 15;
google_ad_format = "728×15_0ads_al";
google_ad_channel ="9478324171″;
google_color_border = "545454″;
google_color_bg = "545454″;
google_color_link = "FFFFFF";
google_color_text = "333333″;
google_color_url = "B6B6B6″;
//–></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

</script>

</div>
</div> <!– End Of Class topbar –>




Google
 
Web innerblogger.com




Leave a Reply