How to add AdSense to Google Sites
You may have seen a notification from Google way back in October 2013 that you are not able to just add the HTML/Javascript code to your Google Sites website any longer. This is very strange....you can have a Google website but cannot put Google AdSense on it with any ease? madness!

Anyway, although you cannot just add the code into your Google Site, you can still add Google AdSense code to your site by using a custom URL gadget.

To do this, first of all you need to create your advert you want to place on your website and take a copy of the code.

Then go into your Google Site and edit the page where you want to add your advert. You should then click Insert and then click More gadgets


Then you should select "Add gadget by URL" and you should see where you can enter a new URL:


You should then enter the following URL:

 https://gcodeadsense.googlecode.com/svn/release/gCodeAdSense/gCodeAdSense.xml  

Then click on the Add button and you should then see a new gadget with these variables:


You should then look at your original code from your Google AdSense advert and fill out the required fields. You should have something like this:

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Ad1 -->
<ins class="adsbygoogle"
     style="display:inline-block;width:300px;height:250px"
     data-ad-client="ca-pub-00000000000000"
     data-ad-slot="0000000000"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

As you can see from the bold red text above, these are the parameters you should enter into the fields.

Once you have done this, click the OK button and this should then add your Google AdSense advert to your Google Sites website.

COMMENTS

If you have any questions or comments on this post, then please feel free to leave a comment below using our Disqus system.

Labels: