Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2005
    Location
    Chicago, IL USA
    Posts
    1,549
    Plugin Contributions
    28

    Default Add JavaScript to one product page

    I'm setting up a Cross-Channel campaign within Google AdWords and it requires me to add JavaScript to the landing page. In this case, it's the product page for one product. How do I add JavaScript, in the header ideally, to just on product page?

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Add JavaScript to one product page

    I have not seen the code buy you can try including it in the product description or as this only parses html correctly you could link to the code instead - again within the product description
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Oct 2005
    Location
    Chicago, IL USA
    Posts
    1,549
    Plugin Contributions
    28

    Default Re: Add JavaScript to one product page

    I was under the impression I could not include anything but html in the product description.

    Here is the code (modified to protect the innocent):
    <!-- Google Code for default Conversion Page -->
    <script language="JavaScript" type="text/javascript">
    <!--
    var google_conversion_type = 'landing';
    var google_conversion_id = 9999999999;
    var google_conversion_language = "en_US";
    var google_conversion_format = "1";
    var google_conversion_color = "FFFFFF";
    //-->
    </script>
    <script language="JavaScript" src="http://www.googleadservices.com/pagead/conversion.js">
    </script>
    <noscript>
    <img height=1 width=1 border=0 src="http://www.googleadservices.com/pagead/conversion/999999999/extclk?script=0">
    </noscript>


    I did add it to a test product and it does not give any errors. Will it work from that part of the page?

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Add JavaScript to one product page

    I did add it to a test product and it does not give any errors. Will it work from that part of the page?
    Did it work for this test product??
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Oct 2005
    Location
    Chicago, IL USA
    Posts
    1,549
    Plugin Contributions
    28

    Default Re: Add JavaScript to one product page

    Quote Originally Posted by kobra View Post
    Did it work for this test product??
    I don't know yet. I just added the code to see if the page would load properly.

    It loads but I can't say if the script is functioning. It's tied to a PPC campaign but this page is not the one linked too from the ad. I could try it, but I was hoping someone had done this before or knew if adding JavaScript in this way would work.

  6. #6
    Join Date
    Oct 2005
    Location
    Chicago, IL USA
    Posts
    1,549
    Plugin Contributions
    28

    Default Re: Add JavaScript to one product page

    I just noticed, the script add the 'Google Site Stats' box, so it's right at the end of the product description. This may not work this way.

    Any other suggestions as to how I can add this in a less conspicuous way?

 

 

Similar Threads

  1. v139h Multiple Products Add to Cart One Click one product page
    By webguin in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 31 May 2013, 09:34 PM
  2. v151 Problem with ceon and add a javascript in product page...
    By onlysteg in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 31 Jan 2013, 10:32 PM
  3. Add JavaScript Tabs to Product Info Page
    By kbaxta in forum General Questions
    Replies: 1
    Last Post: 1 Jul 2010, 04:14 PM
  4. how do I add a javascript in product page
    By reza in forum Contribution-Writing Guidelines
    Replies: 0
    Last Post: 31 May 2007, 11:54 AM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR