Assitance with Setting up Google Analytics Tracking for Cart

General ShopSite user discussion

Assitance with Setting up Google Analytics Tracking for Cart

Postby Rgkopchak » Wed May 22, 2019 8:36 am

I've never been able to get Google Analytics to work properly with my cart. Looks like things have changed quite a bit since I set up ShopSite originally, so I'm trying to give it another go.

Right now I am referencing the instructions found here: https://www.shopsite.com/templates/cookbook/ga-enhanced-ecommerce.html

Right now I've got the follow code in each section of my cart:

Code: Select all
      <script type="text/javascript">       
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', '-']);
      _gaq.push(['_trackPageview']);
      
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();     
       
      </script>


This does the job of analytics tracking, and then on the "Thank You" page I've got the following:

Code: Select all
<!-- Google Code for Thank You Page Conversion Page -->
            <script type="text/javascript">
            /* <![CDATA[ */
            var google_conversion_id = 1008683109;
            var google_conversion_language = "en";
            var google_conversion_format = "2";
            var google_conversion_color = "ffffff";
            var google_conversion_label = "7e9kCMOO6QEQ5ZD94AM";
            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/1008683109/?label=7e9kCMOO6QEQ5ZD94AM&amp;guid=ON&amp;script=0"/>
            </div>
            </noscript>


This does register as a "conversion" in Google Analytics... but doesn't have the $ values.

If I follow the instructions for "GA enhanced ecommerce", should I REMOVE this code... or leave it and ADD the new code?

Thanks in advance for any assitance you can provide... this has always been something missing from our shopsite experience, so I am hoping I can fix it!
Rgkopchak
 
Posts: 34
Joined: Wed Jul 28, 2010 7:45 am
Location: Missouri

Re: Assitance with Setting up Google Analytics Tracking for

Postby cyoung » Fri May 24, 2019 11:08 am

On the thank you page, this line:

var google_conversion_value = 0;

should be:

var google_conversion_value = ss_ordertotal;
cyoung
 
Posts: 73
Joined: Wed Nov 09, 2016 11:01 am

Re: Assitance with Setting up Google Analytics Tracking for

Postby Rgkopchak » Fri May 24, 2019 12:22 pm

Good catch! I'll change that ASAP, but I'm still left wondering if I should ADD the code listed "Ga enhanced" or REPLACE this code with that...

I do appreciate the assistance here!
Rgkopchak
 
Posts: 34
Joined: Wed Jul 28, 2010 7:45 am
Location: Missouri


Return to User Forum

Who is online

Users browsing this forum: Exabot [Bot] and 8 guests

cron