Announcement

Collapse
No announcement yet.

Adwords Purchase/Sale Conversion code error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Adwords Purchase/Sale Conversion code error

    I have recently added the Adwords tracking code to our receipt page and now get an error. This error is fixed by removing the

    Code:
    var google_conversion_value = 0;
    if (NETQUOTEVAR:ACTINICORDERTOTAL) 
    {
    google_conversion_value = NETQUOTEVAR:ACTINICORDERTOTAL / 100;
    }
    part of the code, However we need this to get the cost data transferred.

    Actinic is now reporting an error on the receipt page

    'A JavaScript error has been found on the page ('Expected')").


    Code:
    <!-- Google Code for Purchase/Sale Conversion Page -->
    <script type="text/javascript">
    /* <![CDATA[ */
    var google_conversion_id = 123456789;
    var google_conversion_language = "en";
    var google_conversion_format = "3";
    var google_conversion_color = "ffffff";
    var google_conversion_label = "purchase";
    var google_conversion_value = 0;
    if (NETQUOTEVAR:ACTINICORDERTOTAL) 
    {
    google_conversion_value = NETQUOTEVAR:ACTINICORDERTOTAL / 100;
    }
    /* ]]> */
    </script>
    <script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js">
    </script>
    <noscript>
    <div style="display:inline;">
    <img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/123456789/?label=purchase&amp;guid=ON&amp;script=0"/>
    </div>
    </noscript>
    Any ideas?
    Blog, Twitter, Facebook
    Actinic Ecommerce, CMS and Video production

    www.petraboase.com
    www.progrow.co.uk
    www.christopherpiperwines.co.uk
    www.cheeksandcherries.co.uk
    www.skatewarehouse.co.uk

    #2
    Try this:

    Code:
    <!-- Google Code for Purchase/Sale Conversion Page -->
    <script type="text/javascript">
    /* <![CDATA[ */
    var google_conversion_id = 123456789;
    var google_conversion_language = "en";
    var google_conversion_format = "3";
    var google_conversion_color = "ffffff";
    var google_conversion_label = "purchase";
    var google_conversion_value = 0;
    if (<actinic:variable name="ActinicOrderTotal" />) 
    {
    google_conversion_value = <actinic:variable name="ActinicOrderTotal" /> / 100;
    }
    /* ]]> */
    </script>
    <script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js">
    </script>
    <noscript>
    <div style="display:inline;">
    <img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/123456789/?label=purchase&amp;guid=ON&amp;script=0"/>
    </div>
    </noscript>

    Comment


      #3
      Thanks Duncan,

      Have amended and uploaded. Now I shall sit next to Adwords and click F5 continously...
      Blog, Twitter, Facebook
      Actinic Ecommerce, CMS and Video production

      www.petraboase.com
      www.progrow.co.uk
      www.christopherpiperwines.co.uk
      www.cheeksandcherries.co.uk
      www.skatewarehouse.co.uk

      Comment


        #4
        I am having the same problem!

        Where about to do you have to copy and paste the coding too?

        Neil

        Comment


          #5
          See here: http://actinic-tips-n-tricks.postero...ng-code-into-y

          Comment


            #6
            Cheers for the link.

            The video has no sound?
            One last question
            I take it you have to put your google ua code where 123456789 is?

            var google_conversion_id = 123456789;
            to this
            var google_conversion_id = UA-12345678-1;


            Neil

            Comment


              #7
              Yes substitute the unique number given to you by Google

              Comment


                #8
                I have added the code and nothing seems to be showing in GA?

                Do I need to wait for a customer to buy something from my site to see this working or will it pull up past orders?

                Here's a copy of my receipt page.

                Code:
                <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
                <html>
                <head>
                <meta name="description" content="Genuine Car Parts at Low Prices, Genuine Nissan Parts, Genuine Fiat Parts, Genuine Subaru Parts, Genuine Kia Parts, Genuine Suzuki Parts, Genuine Isuzu Parts, Nissan, Subaru, Fiat, Kia, Isuzu, spark plugs, air filter, oil filter, Fuel Filter, Pollen Filter, Service Items, brakes, Brake Pads, Brake Shoes, Engine, Gaskets, Exhaust, Brake Pads, Brake Disc, Brake Discs, Front Brakes, Rear Brakes, Wiper Blades, next day delivery, Low Cost, Impreza, Legacy, Outback, Justy, Micra, Note, Primera, Juke, Cube, Qashqai, Navara, D40, D22, NP300, Xtrail, X-Trail, XTrail, NV200, SX4, Liana, Swift, Ignis, Alto, Grand Vitara, Vitara, Carens, Sedona, Sportage, Cee'd, Ceed, Cerato, Clarus, Magentis, Mentor, Picanto, Pride, Rio, Shuma, Venga, Trooper, Rodeo, Grande Punto, Punto, Stilo, Panda, Panda 4x4, Multipla, 4x4, van, off road, Specials Price, Sat-Nav, Radio's, ICE, Workshop Consumables, Merchandise, Gloves, Brake Cleaner, Cleaning Fluids, Sprays, Lube, Grease, Sealants, Glues, Paper Rolls, Steering Wheel Covers, Floor Mats, Seat Cover, Hose Clips, Tape, Cable Ties" /> 
                <meta name="author" content="Neil Spinney" />
                <meta name="google-site-verification" content="bkbeGU-OyBxauWNz-0LfydGKHxvcZ3mCK5AQCD5iJMs" />
                <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                <title><actinic:variable name="PageTitle" /></title>
                <actinic:variable name="BaseHref" />
                <actinic:variable name="MetaTags" />
                <actinic:block if="%3cactinic%3avariable%20name%3d%22IsP3PPolicyUsed%22%20%2f%3e">
                  <link rel="P3Pv1" href="<actinic:variable name="P3PFullPolicyLink" />">
                </actinic:block>
                <link href="actinic.css" rel="stylesheet" type="text/css">
                <actinic:variable name="JavaScriptFunctions" />
                <link href="gstyles.css" type="text/css" rel="stylesheet"/>
                <script src="jquery-1.3.2.min.js" language="javascript" type="text/javascript"></script>
                <script src="jquery.cycle.min.js" language="javascript" type="text/javascript"></script>
                <script>
                jQuery.noConflict();
                jQuery(document).ready( function(){
                	jQuery('#photos').cycle('fade');
                });
                </script>
                
                </head>
                
                <body onload="<actinic:variable value="PreloadImages" name="OnLoadScript" />">
                <div id="wrap">
                    <div id="header">
                    
                    	<div id="reflective_top_menu_padding">
                			<!-- main menu -->
                			<ul id="reflective_menu_top">
                			<form name="simplesearch" method="get" action="<actinic:variable name="OnlineScriptURL" value="Search Script URL" />">
                			<actinic:block if="%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e">
                			<!-- Hidden field when in trial mode -->
                			<input type="hidden" name="SHOP" value="<Actinic:Variable Name="HiddenFields"/>" />
                			</actinic:block>
                			<input type="hidden" name="page" value="search" />
                         <input type="hidden" name="PR" value="-1" />
                         <input type="hidden" name="TB" value="A" />
                				<li class="search_box"><input align="top" class="main_search_box" name="SS" type="text" value="search for ..." onfocus="this.value='';"></li>
                				<li class="search_box_button"><input type="submit" class="button" name="ACTION" value="<actinic:variable name="QuickSearchButtonText" />"></li>
                			</form>
                				<li class="spacing">&nbsp;</li>
                				<li><a class="reflective_cart" href="<actinic:variable name="CartLinkText" />"><actinic:variable name="CartText" /></a> </li>
                				<li>
                				<actinic:block if="%28%3cactinic%3avariable%20name%3d%22IsGoogleAnalyticsEnabled%22%20%2f%3e%20%3d%3d%20false%29%20%20OR%20%28%3cactinic%3avariable%20name%3d%22IsSSLUsedForEssentialPages%22%20%2f%3e%20%3d%3d%20false%29%20OR%0d%28%3cactinic%3avariable%20name%3d%22IsSplitSSLSubdomain%22%20%2f%3e%20%3d%3d%20true%29">
                				<a class="checkout" href="<actinic:variable name="OrderLinkText" />" <actinic:block if="%3cactinic%3avariable%20name%3d%22RemoveCustomFrameInCheckout%22%20%2f%3e%20%3d%3d%20True" >target="_top" </actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22RemoveCustomFrameInCheckout%22%20%2f%3e%20%21%3d%20True" >target="_self" </actinic:block>><Actinic:Variable Name="CheckOutText"/></a>	
                				</actinic:block>
                				<actinic:block if="%28%3cactinic%3avariable%20name%3d%22IsGoogleAnalyticsEnabled%22%20%2f%3e%20%3d%3d%20true%29%20%20AND%20%28%3cactinic%3avariable%20name%3d%22IsSSLUsedForEssentialPages%22%20%2f%3e%20%3d%3d%20true%29%20AND%0d%28%3cactinic%3avariable%20name%3d%22IsSplitSSLSubdomain%22%20%2f%3e%20%3d%3d%20false%29">
                				<a class="checkout" href="<actinic:variable name="OrderLinkText" />" <actinic:block if="%3cactinic%3avariable%20name%3d%22RemoveCustomFrameInCheckout%22%20%2f%3e%20%3d%3d%20True" >target="_top" </actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22RemoveCustomFrameInCheckout%22%20%2f%3e%20%21%3d%20True" >target="_self" </actinic:block> <actinic:variable name="GoogleAnalyticsMarkup" value="Google Analytics Checkout Link" />><actinic:variable name="CheckOutText" /></a> 
                				</actinic:block>
                				</li>
                				<li class="items_value"><actinic:variable name="ShoppingCartSummary" value="Shopping Cart Summary In A Line" /></li>
                				
                			<Actinic:NOTINB2B>
                				<li class="spacing">&nbsp;</li>
                				<li><a class="login" href="http://www.gparts.co.uk/cgi-bin/ss000001.pl?ACTION=LOGIN">Login</a></li>
                			</Actinic:NOTINB2B>
                			
                			<Actinic:NOTINB2B><!--</Actinic:NOTINB2B>
                				<li class="spacing">&nbsp;</li>
                				<li><a class="login" HREF="http://www.gparts.co.uk/cgi-bin/bb000001.pl?ACTION=LOGOUT" TARGET="_self">Logout</a></li>
                			<Actinic:NOTINB2B>--></Actinic:NOTINB2B>
                			</ul>	
                			
                      <actinic:block if="%3cactinic%3avariable%20name%3d%22IsNotPreviewMode%22%20%2f%3e" >
                			<h4 class="accdetails"><actinic:variable name="NowServing" /><actinic:variable name="CurrentAccount" /></h4>
                      </actinic:block>
                      
                		</div>
                		
                		
                
                        <div id="top">
                        
                        </div>
                        <div id="nav">
                        	<ul id="nav_list">
                            	<li><a class="fiat" href="http://www.gparts.co.uk/cgi-bin/ss000001.pl?SECTIONID=fiat%2ehtml&NOLOGIN=1"><span>click here <br/>for fiat</span></a></li>
                                <li><a class="isuzu" href="http://www.gparts.co.uk/cgi-bin/ss000001.pl?SECTIONID=isuzu%2ehtml&NOLOGIN=1"><span>click here <br/>for isuzu</span></a></li>
                                <li><a class="subaru" href="http://www.gparts.co.uk/cgi-bin/ss000001.pl?SECTIONID=subaru%2ehtml&NOLOGIN=1"><span>click here <br/>for subaru</span></a></li>
                                <li><a class="kia" href="http://www.gparts.co.uk/cgi-bin/ss000001.pl?SECTIONID=kia%2ehtml&NOLOGIN=1"><span>click here <br/>for kia</span></a></li>
                                <li><a class="nissan" href="http://www.gparts.co.uk/cgi-bin/ss000001.pl?SECTIONID=nissan%2ehtml&NOLOGIN=1"><span>click here <br/>for nissan</span></a></li>
                                <li><a class="suzuki" href="http://www.gparts.co.uk/cgi-bin/ss000001.pl?SECTIONID=suzuki%2ehtml&NOLOGIN=1"><span>click here <br/>for suzuki</span></a></li>
                            </ul>
                        </div>
                    </div>
                    <div id="main">
                    
                    
                    
                    
                    
                    
                    
                    
                        
                        
                			<!-- left column -->
                			<div id="sidebar-left">
                		
                			<ul>
                				<actinic:block if="%3cactinic%3avariable%20name%3d%22HomePageType%22%20%2f%3e%20%21%3d%20%270%27">
                					<li><actinic:variable name="NavigationIcon" value="Home Basic Link" /></li>
                				</actinic:block>
                				<li><actinic:variable name="NavigationIcon" value="View Cart Basic Link" /></li>
                				<li><actinic:variable name="NavigationIcon" value="Checkout Basic Link" /></li>
                				
                			<Actinic:NOTINB2B>
                			<li><actinic:variable name="NavigationIcon" value="Store Top Basic Link" /></li>
                			<li><actinic:variable name="NavigationIcon" value="Up A Level Basic Link" /></li>
                			</Actinic:NOTINB2B>
                
                			<li><actinic:variable name="NavigationIcon" value="Contact Us Basic Link" /></li>
                
                			<Actinic:NOTINB2B>
                				<li><a href="http://www.gparts.co.uk/cgi-bin/ss000001.pl?ACTION=LOGIN">Login</a></li>
                			</Actinic:NOTINB2B>
                			
                			<Actinic:NOTINB2B><!--</Actinic:NOTINB2B>
                			<li><a HREF="http://www.gparts.co.uk/cgi-bin/bb000001.pl?ACTION=LOGOUT" TARGET="_self">Logout</a></li>
                			<Actinic:NOTINB2B>--></Actinic:NOTINB2B>
                
                			</ul>
                			
                			<br/>
                			<!--
                Skype 'My status' button
                http://www.skype.com/go/skypebuttons
                -->
                <script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js"></script>
                <a href="skype:GParts.co.uk?call"><img src="http://mystatus.skype.com/bigclassic/GParts%2Eco.uk" style="border: none;" width="140" height="44" alt="My status" /></a>
                
                			<!-- Facebook Badge START --><a href="http://www.facebook.com/pages/GParts/111449332210539" target="_TOP" style="font-family: &quot;lucida grande&quot;,tahoma,verdana,arial,sans-serif; font-size: 11px; font-variant: normal; font-style: normal; font-weight: normal; color: #3B5998; text-decoration: none;" title="GParts Facebook Page">GParts</a><br/><a href="http://www.facebook.com/pages/GParts/111449332210539" target="_TOP" title="GParts"><img src="http://badge.facebook.com/badge/111449332210539.1246.1492518257.png" width="140" height="156" style="border: 0px;" /></a><br/><a href="http://www.facebook.com/business/dashboard/" target="_TOP" style="font-family: &quot;lucida grande&quot;,tahoma,verdana,arial,sans-serif; font-size: 11px; font-variant: normal; font-style: normal; font-weight: normal; color: #3B5998; text-decoration: none;" title="Make your own badge!">Promote your Page too</a><!-- Facebook Badge END -->
                			
                			</div>
                			
                		<!-- end left column -->
                
                        
                        <div id="content">
                        
                <actinic:block if="%3cactinic%3avariable%20name%3d%22IsBrochureHomePage%22%20%2f%3e">
                	             <div id="welcome_plug">
                                <h2>Welcome to GParts</h2>
                                <p id="welcome_intro">5 simple steps to buying your car parts</p>
                                <ul>
                                <li>1st select your manufacturer</li>
                                <li>2nd select your model</li>
                                <li>3rd select your part</li>
                                <li>4th add your part to the shopping cart</li>
                                <li>5th pay for your items and wait for delivery</li>
                                </ul>
                            </div>
                            <div id="photos">
                            	<img src="designimages/photo_01.jpg" width="370" height="269" />
                            	<img src="designimages/photo_07.jpg" width="370" height="269"  />
                                <img src="designimages/photo_02.jpg" width="370" height="269"  />
                                <img src="designimages/photo_08.jpg" width="370" height="269"  />
                                <img src="designimages/photo_03.jpg" width="370" height="269"  />
                                <img src="designimages/photo_04.jpg" width="370" height="269"  />
                                <img src="designimages/photo_08.jpg" width="370" height="269"  />
                                <img src="designimages/photo_05.jpg" width="370" height="269"  />
                                <img src="designimages/photo_08.jpg" width="370" height="269"  />
                            </div>
                            
                            <br class="dirtylittletrick" />
                
                            <div id="usp">
                            	<ul>
                                    <li class="usp1"><h3>Genuine Parts</h3><p>We only supply genuine parts</p></li>
                                    <li class="usp2"><h3>Low Prices</h3><p>Lowest prices for genuine <br />parts online</p></li>
                                    <li class="usp3"><h3>Massive Stock</h3><p>We stock thousands of genuine <br />car parts</p></li>
                                    <li class="usp4"><h3>Established for <br />80 years</h3><p></p></li>
                                    <li class="usp5"><h3>Fast Delivery</h3><p>95% of all parts dispatched <br />in 48 hrs</p></li>
                                    <li class="usp6"><h3>Eco Friendly</h3><p>We pride ourselves in being a green company</p></li>
                                </ul>
                            </div>
                
                                	</actinic:block>
                                    
                            <br class="dirtylittletrick" />
                                        
                            <Actinic:Variable Name="INNERLAYOUT"/>
                
                         <actinic:block if="%3cactinic%3avariable%20name%3d%22RecentlyViewedListIsEnabled%22%20%2f%3e%20%3d%3d%20True" >
                				<actinic:variable name="RecentProducts" />
                         </actinic:block>
                
                         <actinic:variable name="FeefoSiteLogo" />
                
                         <actinic:variable name="FeefoSiteFeedback" />
                        </div>
                            
                        <div id="footer">
                        <p><actinic:variable name="NavigationIcon" value="Terms Basic Link" /> | <actinic:variable name="NavigationIcon" value="Sitemap Basic Link" /> | &copy;2010 GParts</p>
                          <script type="text/javascript">
                
                document.write("Website Last Updated: ");
                var d=new Date();
                document.write(d);
                
                
                </script>
                
                
                
                        <Actinic:Variable Name="HeaderFooter"/>
                        
                        </div>
                  </div>
                </div>
                </div>
                <actinic:variable name="GoogleAnalyticsMarkup" value="Google Analytics Tracking Code" />
                <!-- Google Code for Purchase/Sale Conversion Page -->
                <script type="text/javascript">
                /* <![CDATA[ */
                var google_conversion_id = UA-12345678-1;
                var google_conversion_language = "en";
                var google_conversion_format = "3";
                var google_conversion_color = "ffffff";
                var google_conversion_label = "purchase";
                var google_conversion_value = 0;
                if (<actinic:variable name="ActinicOrderTotal" />) 
                {
                google_conversion_value = <actinic:variable name="ActinicOrderTotal" /> / 100;
                }
                /* ]]> */
                </script>
                <script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js">
                </script>
                <noscript>
                <div style="display:inline;">
                <img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/123456789/?label=purchase&amp;guid=ON&amp;script=0"/>
                </div>
                </noscript>
                <script src="http://www.jotform.com/min/g=orangebox" type="text/javascript"></script>
                <div id="feedback-tab" style="display:none"><button boxwidth="100" class="orangebox" id="feedback-tab-link" formID="2770948252" base="http://www.jotform.com/" height="500" width="700" title="Parts Enquiry">Cannot Find What You Are Looking For? Click Here</button></div>
                </body>
                </html>
                        </div>
                
                </body>
                <div id="fb-root"></div>
                <script>
                  window.fbAsyncInit = function() {
                    FB.init({appId: 'your app id', status: true, cookie: true,
                             xfbml: true});
                  };
                  (function() {
                    var e = document.createElement('script'); e.async = true;
                    e.src = document.location.protocol +
                      '//connect.facebook.net/en_US/all.js';
                    document.getElementById('fb-root').appendChild(e);
                  }());
                </script>
                </html>

                Comment


                  #9
                  The Google code account number is not correct on that page.

                  You have used UA-12345678-1. Check the code that Google gives you - you will see your specific reference there.

                  It will not go back in time and report previous orders.

                  Comment


                    #10
                    Originally posted by drounding View Post
                    The Google code account number is not correct on that page.

                    You have used UA-12345678-1. Check the code that Google gives you - you will see your specific reference there.

                    It will not go back in time and report previous orders.
                    I used that code as an example!
                    On the page coding on the site I have used the correct code!!

                    Comment


                      #11
                      Have you had sales then resulting from the ads yet?
                      When you do you should see the reporting in Google.

                      Comment


                        #12
                        Ummm just realized I have total made a c*** UP

                        I thought the code was to get Google Analytics to work one the site.
                        As mine for some reason is not recording sales!

                        Must of had my head somewhere else when I looked at this thread!

                        I will see if I can search for info on my problem!


                        Neil

                        Comment


                          #13
                          Actinic seems to be mangling the CDATA Tags ? I tried to insert this in to the recipt page


                          this is from the google site https://support.google.com/adwords/a...2021?hl=en-GB&

                          Some content management systems or WYSIWYG editors (known as What You See Is What You Get editors) strip the /* <![CDATA[ */ and /* ]]> */ portion of the conversion tracking script. If you use any form of visual editor to insert JavaScript into your pages, check to make sure it hasn't incorrectly changed the script.

                          Incorrect
                          Code:
                          
                          
                          		
                            <script type="text/javascript">
                              / <![CDATA[ /
                             var google_conversion_id = 123456789;
                             var google_conversion_language = "en";
                             var google_conversion_format = "2";
                             var google_conversion_color = "ffffff";
                             var google_conversion_label = "AAAAAAAAAAAAAAAAAAA";
                             var google_conversion_value = 0;
                             / ]]> /
                             </script>
                             <script type="text/javascript" 
                            src="http://www.googleadservices.com/pagead/conversion.js">
                             </script>
                             <noscript>
                             <div style="display:inline;">
                             <img height="1" width="1" style="border-style:none;" alt="" 
                            src="http://www.googleadservices.com/pagead/conversion/123456789/
                            ?label=AAAAAAAAAAAAAAAAAAA&guid=ON&script=0"/>
                             </div>
                             </noscript>
                          And here is my code

                          Code:
                          <!-- Google Code for Bounce Conversion Page -->
                          <script type="text/javascript">
                          /* <![CDATA[ */
                          var google_conversion_id = 10101010101;
                          var google_conversion_language = "en";
                          var google_conversion_format = "3";
                          var google_conversion_color = "ffffff";
                          var google_conversion_label = "conversion LABEL";
                          var google_conversion_value = 0;
                          if (<actinic:variable name="ActinicOrderTotal" />) 
                          {
                          google_conversion_value = <actinic:variable name="ActinicOrderTotal" /> / 100;
                          }
                          /* ]]> */
                          </script>
                          <script type="text/javascript" 
                          src="https://www.googleadservices.com/pagead/conversion.js">
                          </script>
                          <noscript>
                          <div style="display:inline;">
                          <img height="1" width="1" style="border-style:none;" alt="" 
                          src="https://www.googleadservices.com/pagead/conversion/
                          101010101/?value=Bounce%20To%20Checkout&amp;label=
                          MY TRACKING_nC_AM&amp;guid=ON&amp;script=0"/>
                          </div>
                          </noscript>
                          http://www.novadetox.co.uk

                          Comment

                          Working...
                          X