Friday, February 18, 2005

Call your Adsense code into pages

If you want to call your Adsense code into pages - it's easy.

It's called SSI (Server Side Includes).

you put your adsense code into a separate file (save it with the extension .ssi)

In the html of the pages which you want to display adsense - insert one line of code which calls that file. It's done using an 'include' command as shown below:



Place this at the location in the html that you would've place the Adsense code to show up in your chosen area.

Then simply save your page with the .Shtml extension instead of just html


If you want to be able to select where on the page it will be displayed then you'd need to just add some form of identifying comment code (code that won't be displayed when the page is shown) in the various places that you want to experiment with.

Then just get a file search and replace tool and when you want to put your code in that place, insert an 'include' line to replace the 'tag' you've chosen for that position. It'd be a good idea in this case to save multiple .ssi files with the same Adsense code, but with different file names so that you can separately control each location on the pages and have multiple Adsense ads shown if you want.

AndyH

0 Comments:

Post a Comment

<< Home