Google Analytics not showing eCommerce results

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kwgarrett
    Mivite

    • Oct 2008
    • 135

    #1

    Google Analytics not showing eCommerce results

    Yesterday I switched from my old Google Analytics code to using the Miva module. It seems to be working fine except that the GA console is not showing any ecommerce results.

    I have the <mvt:item name="ga_transaction" /> tag at the bottom of the invoice page. It is the stock code:

    Code:
    <script type="text/javascript">
    
    
     _gaq.push(['_addTrans',
     '&mvt:ga_transaction:order_id;',    // transaction ID - required
     '&mvt:ga_transaction:store_name;',    // affiliation or store name
     '&mvt:ga_transaction:order_total;',    // total - required
     '&mvt:ga_transaction:total_tax;',    // tax
     '&mvt:ga_transaction:total_ship;',    // shipping
     '&mvt:ga_transaction:ship_city;',    // city
     '&mvt:ga_transaction:ship_state;',    // state or province
     '&mvt:ga_transaction:ship_cntry;'    // country
     ]);
    <mvt:foreach iterator="item" array="ga_transaction:orderitems">
     _gaq.push([ '_addItem',
     '&mvt:item:order_id;',            // transaction ID - required
     '&mvt:item:code;',            // SKU/code - required
     '&mvt:item:name;',            // product name
     '&mvt:item:cancat_code;',        // category or variation
     '&mvt:item:price;',            // unit price - required
     '&mvt:item:quantity;'            // quantity - required
     ]);
    </mvt:foreach>
     _gaq.push(['_trackTrans']);        //submits transaction to the Analytics servers
    
    
    </script>

    This is the code that it wrote to the INVC page on my test transaction:

    Code:
    <script type="text/javascript">
    _gaq.push(['_addTrans',
    '60562',    // transaction ID - required
    '\x45\x73\x70\x72\x65\x73\x73\x6f\x20\x50\x6f\x64\x73\x20\x66\x72\x6f\x6d\x20\x50\x6f\x64\x4d\x65\x72\x63\x68\x61\x6e\x74',    // affiliation or store name
    '9.74',    // total - required
    '0.00',    // tax
    '9.24',    // shipping
    '\x56\x61\x6c\x65\x6e\x63\x69\x61',    // city
    '\x43\x41',    // state or province
    '\x55\x53'    // country
    ]);
    _gaq.push([ '_addItem',
    '60562',    // transaction ID - required
    '\x4c\x55\x43\x41\x33\x30\x38',    // SKU/code - required
    '\x4c\x75\x63\x61\x66\x66\x65\x20\x41\x73\x68\x74\x72\x61\x79',    // product name
    '\x4f\x54\x48\x52',    // category or variation
    '0.50',    // unit price - required
    '1'    // quantity - required
    ]);
    _gaq.push(['_trackTrans']);    //submits transaction to the Analytics servers
    </script>

    Using a Hex Decoder I translate it as:

    Code:
    <script type="text/javascript">
    _gaq.push(['_addTrans',
    '60562',    // transaction ID - required
    'Espresso Pods from PodMerchant',    // affiliation or store name
    '9.74',    // total - required
    '0.00',    // tax
    '9.24',    // shipping
    'Valencia',    // city
    'CA',    // state or province
    'US'    // country
    ]);
    _gaq.push([ '_addItem',
    '60562',    // transaction ID - required
    'LUCA308',    // SKU/code - required
    'Lucaffe Ashtray',    // product name
    'OTHR',    // category or variation
    '0.50',    // unit price - required
    '1'    // quantity - required
    ]);
    _gaq.push(['_trackTrans']);    //submits transaction to the Analytics servers
    </script>
    Which looks quite correct. I assume that GA understands the Hex encoding? I don't see a setting at the GA website to signify that the data is encoded.

    What am I missing?

    Kevin Garrett
  • KNewbrough
    Mivite

    • May 2013
    • 200

    #2
    Re: Google Analytics not showing eCommerce results

    Do you have Ecommerce tracking enabled on your GA account? It is not enabled by default.

    Click Admin in the upper right, then in the far right column click View Settings, scroll down and make sure "Ecommerce tracking" is set to "ON".
    Kyle Newbrough
    Technical Support / Web Developer
    Miva Merchant

    Comment

    • kwgarrett
      Mivite

      • Oct 2008
      • 135

      #3
      Re: Google Analytics not showing eCommerce results

      Yup. It's set to "ON."

      Thanks for your reply.

      Kevin

      Comment

      • KNewbrough
        Mivite

        • May 2013
        • 200

        #4
        Re: Google Analytics not showing eCommerce results

        How long ago did you set this up and turn that setting on? I've seen transaction data take 3 or more days to begin appearing in a GA profile after being set up correctly.

        Are you, by any chance, using a shared SSL certificate for your secure pages so that your checkout and account page URLs have a different domain than the rest of the store?
        Kyle Newbrough
        Technical Support / Web Developer
        Miva Merchant

        Comment

        • kwgarrett
          Mivite

          • Oct 2008
          • 135

          #5
          Re: Google Analytics not showing eCommerce results

          Nope not using shared SSL. I just turned on the Ecommerce setting yesterday. Perhaps I'm jumping the gun, but all the other statistics show up. GA just says I have no revenue and no products are being purchased, but that just isn't true. Pretty hard to debug something with a 3+ day time lag. Thanks for the info.

          Kevin

          Comment

          • Dan - Glendale Designs
            Mega Mivite


            • Sep 2006
            • 2904

            #6
            Re: Google Analytics not showing eCommerce results

            Kevin,

            Looks like you might be using PayPal Advanced, which implements it's own checkout screens. May want to ensure Google Analytics tracking remains intact throughout those steps. (just a hunch)

            Comment

            • kwgarrett
              Mivite

              • Oct 2008
              • 135

              #7
              Re: Google Analytics not showing eCommerce results

              I am using PayPal Advanced but only as a card payment processor and it still results in the standard INVC screen. But I just changed back to Authorize.net for testing (I had just implemented Paypal this weekend). Just in case.

              I realized that the ga_transaction code has NO content telling GA which store the data comes from. So I figured I needed to add the ga_tracking code to the invoice too, even though it's in a different script, so I don't know how that will work. Anyway, I added the ga_tracking code (but forgot to switch on the item until I just now did a test and looked at the INVC results source (Oy...). So now I'm back to waiting to see Ecommerce results show up in GA.

              Kevin

              Comment

              • Dan - Glendale Designs
                Mega Mivite


                • Sep 2006
                • 2904

                #8
                Re: Google Analytics not showing eCommerce results

                I am using PayPal Advanced but only as a card payment processor and it still results in the standard INVC screen. But I just changed back to Authorize.net for testing (I had just implemented Paypal this weekend). Just in case.
                Understand, however if the standard tracking is interrupted in any way, it can trip up ecommerce, which is where I was going with that. Ultimately I would see if there are any holes in the standard tracking, not just the ecommerce being implemented on the INVC screen.

                I realized that the ga_transaction code has NO content telling GA which store the data comes from. So I figured I needed to add the ga_tracking code to the invoice too, even though it's in a different script, so I don't know how that will work. Anyway, I added the ga_tracking code (but forgot to switch on the item until I just now did a test and looked at the INVC results source (Oy...). So now I'm back to waiting to see Ecommerce results show up in GA.
                If you added the ga_tracking to the INVC screen again, then this will create an duplicate tracking elements and most definitely trip up your ecommerce data. So you may have resolved it right there. While it can take 24-48 hours for full ecommerce data to populate, we often see certain data come in within an hour or two, so it is worth monitoring to see if that indeed resolved the issue or not so you don't have to wait until tomorrow.

                Comment

                • kwgarrett
                  Mivite

                  • Oct 2008
                  • 135

                  #9
                  Re: Google Analytics not showing eCommerce results

                  OK. I just got my first morsel of Ecommerce data!

                  To your points, I am certain the ga_tracking is active on all pages. It was not on the INVC as I figured the ga_transaction was all that went there.

                  I didn't add the ga_tracking to INVC again. I had not put it there before (only ga_transaction). So it looks like the INVC page needs both ga_tracking and ga_transaction snippets/Items.

                  I sure wish Miva had better documentation. The MivaPR8_10-11-12.PDF does not tell you what to do. The only "documentation" seems to consist of questions and answers in this forum.

                  I will soon switch back to PayPal and see if that stops the Ecommerce results. Then I'll know for sure what the problem is.

                  Thanks for your help.

                  Kevin Garrett

                  Comment

                  Working...
                  X