Forum Moderators: open

Message Too Old, No Replies

Troubles adding my AdSense script

         

peejicky

11:38 pm on Mar 14, 2005 (gmt 0)

10+ Year Member



I have a website built with Microsoft Publisher. I want a Adsense banner at the top and on the left side. I have a Google account and can copy my script but how do I add it to the website? I have tried the "add HTML fragment" on the toolbar but can't paste my script. I've also copied the HTML form of the site to a notepad and saved it as a webpage but must have inserted the script in the wrong place because the ads still don't show up.

Any help would be appreciated.

tedster

10:03 pm on Mar 16, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to the forums, peejicky

...must have inserted the script in the wrong place

Where did you try to insert it? Can you show us the surrounding HTML - a few lines on either side, and just put [SCRIPT HERE] in the spot you tried, instead of your AdSense particulars.

peejicky

10:33 pm on Mar 17, 2005 (gmt 0)

10+ Year Member



<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:b="urn:schemas-microsoft-com:office:publisher"
xmlns="http://www.w3.org/TR/REC-html40">

<script type="text/javascript"><!--
google_ad_client = "pub-#*$!xxxxxxxxxx";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_channel ="";
google_color_border = "FF6600";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_url = "008000";
google_color_text = "000000";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Publisher.Document>
<meta name=Generator content="Microsoft Publisher 10">
<link rel=File-List href=

[edited by: tedster at 10:41 pm (utc) on Mar. 17, 2005]
[edit reason] remove adsense id [/edit]

ncw164x

10:44 pm on Mar 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The adsense code goes in the body of the web page not in the head, according to your example code above it appears over the top of the <head> tag, thats why it will not work!

tedster

11:04 pm on Mar 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Let's see what we can do. The general structure of an HMTL page is like this:

<DOCTYPE>

<HTML>

<HEAD>
</HEAD>

<BODY>
Visible page content
</BODY>

</HTML>

For your script to generate visible content, in need to be inserted in the <body> section - and not just anywhere in the body, but exactly in the section of the body that corresponds to the spot in the page where you want it to show up.

Right now your code is before even the <head> section, so the browser has no idea where to display it. I am guessing that your page is laid out with tables, and this probably means your script needs to be within a table cell (a <td> element) like this:

<td>script here</td>

You will need to decide where the exact spot for the AdSense is, and then find that spot in the code.