Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Google Analytics can not track all sales transactions
 
eitai2001
Guru
 
Total Posts:  330
Joined:  2008-05-14
Johannesburg, South Africa
 

For you guys that are having intermittent orders being tracked like I am. Check if any of the orders NOT tracked have any products with quotation marks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
blackhalo
Jr. Member
 
Total Posts:  10
Joined:  2009-03-18
 
eitai2001 - 23 August 2009 11:39 AM

For you guys that are having intermittent orders being tracked like I am. Check if any of the orders NOT tracked have any products with quotation marks.

That was the answer for me… and I’m using ZenCart at the moment!!
It appears Google Analytics does NOT like quotes… *sigh*

I couldn’t figure it out, everything was working fine…
then all of a sudden tracking is intermittent… we added new products w/ quotes. yup.

Huge thanks to “eitai2001” for dropping the tip!

 
Magento Community Magento Community
Magento Community
Magento Community
 
eitai2001
Guru
 
Total Posts:  330
Joined:  2008-05-14
Johannesburg, South Africa
 

After more investigation on my side, it seems some orders with quotes are tracked, however all orders where credit card is used are not tracked.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Saggy
Sr. Member
 
Total Posts:  133
Joined:  2009-02-03
 

Hi Guys,

This problem is driving me crazy.

Yesterday I placed 10 orders (using same product and same quantity) on test site and out of them only 5 orders are showing fine in GA and 5 are not showing at all.

So all the explaination given in this thread can easily be ruled out.

Cheers
S

 
Magento Community Magento Community
Magento Community
Magento Community
 
ozzy105
Jr. Member
 
Total Posts:  2
Joined:  2009-09-22
 

Hi

We’re seeing a similar problem on our site. As far as we can see the code is setup correctly, and around 60% of transactions ARE being tracked.

Investigating the orders that have not been tracked, it looks as if GA is only tracking orders where the customers have gone through the checkout as a guest. Any orders where the user has logged into the site have not been tracked?

Has anyone else seen this issue?

 
Magento Community Magento Community
Magento Community
Magento Community
 
ozzy105
Jr. Member
 
Total Posts:  2
Joined:  2009-09-22
 

Ah have found the problem with us, seems to be that if using a payment provider like Sagepay or Commidea, for some reason customers who register at the checkout do not get tracked, the tracking gif never gets sent for ecommerce but the page tracking works ok.

Customers who go through as guest or log into existing accounts have no problems. If we turn off Sagepay then this issue goes away, so its definitely a combination of using a payment provider and registering on the checkout.

Anyone else got this problem?

 
Magento Community Magento Community
Magento Community
Magento Community
 
mediagang
Sr. Member
 
Avatar
Total Posts:  111
Joined:  2008-01-16
Leeds UK
 

Hi ozzy105,

What you are describing is maybe explains the problems we are having.  We are tracking all data but none for transactions.  Using SagePay as payment gateway.  This problem started after upgrading to latest magento version.  We made quite a few changes at same time so difficult to pinpoint cause..testing few different changes, will let you know of any success

 
Magento Community Magento Community
Magento Community
Magento Community
 
edgman219
Jr. Member
 
Total Posts:  2
Joined:  2009-10-13
 

Has anyone found a solution this this. We are having the same problem with our cart. Tracks some orders and not others. It isn’t quotes because those orders appear to be tracked and it isn’t paypal we are using authorize.net. This is really irritating and it’s hard to rely on the google analytics data when my number don’t match up.

I tried to track it down to specific products, specific users, guest checkout, quotes, etc, I can’t find any relation for reasons why some would work and some wouldn’t work.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mediagang
Sr. Member
 
Avatar
Total Posts:  111
Joined:  2008-01-16
Leeds UK
 

I now (i think) have this working again.  I say i think becuase it is tracking transactions but have not checked if any are missing.  The issue for me was caused by google analytics plus.  After reinstalling it now works.  Might be worth using / trying same?

 
Magento Community Magento Community
Magento Community
Magento Community
 
edgman219
Jr. Member
 
Total Posts:  2
Joined:  2009-10-13
 

What’s Google Analytics Plus?

 
Magento Community Magento Community
Magento Community
Magento Community
 
mediagang
Sr. Member
 
Avatar
Total Posts:  111
Joined:  2008-01-16
Leeds UK
 

It’s a module made by Fooman http://www.magentocommerce.com/extension/171/fooman-google-analytics-plus

 
Magento Community Magento Community
Magento Community
Magento Community
 
raziburrahman
Jr. Member
 
Total Posts:  1
Joined:  2009-10-13
 

Make sure that:

- E-commerce tracking is turned on in your Google Analytics account
- The Google Analytics tracking code has been added to “pc/footer.asp”
- The secure, HTTPS version of the tracking code is used. Using the non-secure, HTTP version can cause the script not to be executed on the order confirmation page (this might occur if you are using SSL on your store, but are not using the SSL version of the Google Analytics code).
- The file “pc/orderComplete.asp” contains the following lines of code at the very bottom, before the “include” statement that includes “footer.asp”:

Ab rocket

 
Magento Community Magento Community
Magento Community
Magento Community
 
mediagang
Sr. Member
 
Avatar
Total Posts:  111
Joined:  2008-01-16
Leeds UK
 

That is good advice to follow.  So as not to confuse people new to magento, the .asp pages you have mentioned are not magento pages.  The confirmation page is called success.phtml and is located in the /app/design/frontend/default/default/template/checkout/

I don’t think you need to add any code yourself, instead use the control panel to turn on the Google Analytics code.  If you want to check the code is working.  View source from your browser on the confirmation page and look for the google code at the footer of the page in the </body>

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jon Edwards
Jr. Member
 
Total Posts:  29
Joined:  2008-10-10
 

hey everyone - I just realized that GA is only tracking transactional data on orders placed through the ‘one-page’ checkout. Orders placed using the ‘mulitishipping’ method do not track. When I view the source of success.phtml for orders placed using both methods, I see that there are some lines of GA code missing on the mulitishipping orders.

The Magento generated GA code in success.phtml on my multi-shipping checkout orders is:

<!-- BEGIN GOOGLE ANALYTICS CODE -->
<
script type="text/javascript"
//<![CDATA[
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." "http://www.");
[removed](unescape("&#x3C;script src='" gaJsHost "google-analytics.com/ga.js' type='text/javascript'&#x3E;&#x3C;/script&#x3E;"));
//]]>
</script>
<script type="text/javascript"
//<![CDATA[
var pageTracker _gat._getTracker("UA-xxxxxxx-1");
pageTracker._trackPageview("/checkout/multishipping/success/");
//]]>
</script>
<!-- END GOOGLE ANALYTICS CODE -->

The Magento generated GA code in success.phtml on my one-page checkout orders is the same, but has the following code appended below it:

<script type="text/javascript">
//<![CDATA[
pageTracker._addTrans("100000380","","32.9500","0.0000","0.0000","1231","Utah","US");
pageTracker._addItem("100000380","my_sku","My Product Description","","32.9500","1.0000");
pageTracker._trackTrans();
//]]>
</script>

Clearly it’s this “addTrans” code missing from mulit-shipping orders. Is this a magento bug? How can I get magento to add this transactional GA code to my mulit-shipping orders?

Thanks,

Jon

 
Magento Community Magento Community
Magento Community
Magento Community
 
betterbatt
Member
 
Total Posts:  53
Joined:  2009-09-16
 

This thread has gotten way off the original topic. skippybosco and anyone who was involved in this thread when it was PayPal/Google Analytics related see my new thread here:

http://www.magentocommerce.com/boards/viewthread/69547/

I really want to find a solution to this and I’m sure many others do to (and have hopefully solved it already!)

Liam

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top