SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Feb 2005
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Google Ad Words Code Breaking JS Menu

    Hello -

    I am new to Javascript and can't figure out how to put multiple scripts on one page. On my site I have a JS menu. I added Google Ad Words conversion JS code and my menu dissapeared.

    Here's what the code looks like:

    <script language="JavaScript" type="text/javascript">
    <!--
    var google_conversion_id = 1069856660;
    var google_conversion_language = "en_US";
    var google_conversion_format = "1";
    var google_conversion_color = "FFFFFF";
    if (1) {
    var google_conversion_value = 1;
    }
    var google_conversion_label = "PageView";
    //-->
    </script>
    <script type='text/javascript' src="../js/global.js"></script>
    <script type='text/javascript' src="../js/menu_var2.js"></script>
    <script type='text/javascript' src="../js/menu_com2.js"></script>
    <script language="JavaScript" src="http://www.googleadservices.com/pagead/conversion.js">

    <!-- Google Code for PageView Conversion Page -->
    </script>
    <noscript>
    <img height=1 width=1 border=0 src="http://www.googleadservices.com/pagead/conversion/1069856660/?value=1&label=PageView&script=0">
    </noscript>

    I tried putting the Google code before the end body tag but that didn't help. I also rearranged the menu scripts:

    <script type='text/javascript' src="../js/global.js"></script>
    <script type='text/javascript' src="../js/menu_var2.js"></script>
    <script type='text/javascript' src="../js/menu_com2.js"></script>

    by moving them before and after the google code right after the opening body tag. Nothing works.

    Please help.

    Thanks.

  2. #2
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The js in conversion.js "document.write"s an iframe. That script element needs to be in the body of the document. Without looking at your page that's all I can say. Give us a link to your page.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •