Adding ads to your page

Adsense ads come in the shape of JavaScript code, which you will need to add to your web page if you want to display ads. From the beginners perspective, you don't need to know a single thing about JavaScript to create the Adsense code. Google provides a web page that creates the JavaScript code for you, all you need to do is select an ad format, colours and size. Lets take a look at how its done.

Firstly, start by logging into your Adsense account using your email address and password you supplied during sign up.


















Once logged in, select the 'Adsense Setup' tab panel - this is where you can create the different Adsense formats.









Select 'Adsense for Content'. You will be directed to a form that provides options to fully customize the look of your ads, such as selecting ad formats, sizes and colours. We recommend that you select the Single Page option to save time clicking between pages.
















Once you have finished customizing your ad format, colours etc.. you will notice a grey textbox at the very bottom of the screen. The code in this box may look a bit daunting but this is your JavaScript. You must copy the JavaScript code to your web page.










Its easy to copy the code - simply click inside the textbox and the code will automatically be highlighted for you. Now hold down the 'Ctr' key and press 'c' on your keyboard to copy the code into the clipboard.

Depending on your type of web page editor, you will need to view the 'source html' and then paste the Adsense code directly into the html code.



















If you do not have an html editor, then you can open your html code in Notepad and paste the Adsense code directly. We would recommend that you invest in an editor to make the process of adding Adsense code even easier. An excellent choice is Microsoft's Visual Studio 2005 Express - Web Developer, which is free and easy to use. This development tool also provides error checking to make sure all your JavaScript and html tags are valid.

That's all there is to it! Now, you will need to publish the web page with the new Adsense code added.

Tips and Tricks

1. Remember, when placing the Adsense code into your web page make sure you copy the entire code and do not make any changes. This is especially important for beginners who sometimes make the mistake of leaving out the closing tag of the JavaScript block. This has a knock on effect of disabling other Adsense ads in your page.

2. If you want to create other ads, you don't have to close the page each time. The textbox containing the JavaScript code will refresh each and every time you change a property of the ad, such as the colour and size. This saves a lot of time when you want to create 2 or 3 ads.

3. Pay attention to the Adsense rules and guidelines, which limit you to the number of Adsense ads you can show on a page. The limit currently is; 3 Ad units, 1 Link unit, 2 Adsense for Search boxes and a maximum of 2 Referrals (of the same product). Check the most up to date rules to be sure you are not breaking them.

4. Google will disable any ads which break the page limit. If you're sure you haven't broken the limit but ads are not showing then check to make sure you haven't left any unclosed JavaScript tags.