Tips and Tricks HQ Forum

Support Forum for Tips and Tricks HQ Products

Register or log in - lost password? (Having an issue with the forum login?)

Search the Forum

Tips and Tricks HQ Forum » WP eStore Forum

Google Analytics stopped tracking e-commerce transactions

(8 posts) (2 voices)
  • Started 9 months ago by gamehermit
  • Latest reply from gamehermit
  • Possible Solutions (Related Topics):
    1. Google Analytics E-Commerce Not Tracking
    2. Google Analytics E-Commerce Tracking Still Not Working
    3. Integrating Google Analytics Ecommerce with my E-store
    4. Add Google Analytics tracking for [wp_eStore_buy_now_custom_button] shortcode?
    5. E-Commerce Data not showing in Google Analytics

Tags:

  • Google Analytics
  • tracking
  1. gamehermit
    Member

    Hi,

    I just noticed that my Google Analytics account stopped tracking the sales from my siet. It was working July when I was testing but for some reason the sales from the past few weeks have not registered.

    E-commerce is enabled in GA. I have the following code on my "Thank You" page: [wp_eStore_transaction_result:end] and the PayPal return URL and download links on the "Thank You" page work great. Here's the link to the "Thank You" page: http://www.pumpkinlady.com/thank-you/

    I have also verified that the PDT Identity Token has been set correctly and the "Enable Google Analytics Tracking" has ben enabled in the 3rd Party Integration section.

    I just ran a test transaction...here is the view source for Google Analytics for this transaction:

    <script type="text/javascript">//<![CDATA[
    // Google Analytics for WordPress by Yoast v4.1.3 | http://yoast.com/wordpress/google-analytics/
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount','UA-412406-1']);
    _gaq.push(['_trackPageview'],['_trackPageLoadTime'],['_addTrans','1M303855EU897523A','The Pumpkin Lady','0.01','0.00','0.00','Powhatan','VA','United States'],['_addItem','1M303855EU897523A','547','Humdrum Dragon','','0.01','1'],['_trackTrans']);
    (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>

    I'm using the Google Analytics for WordPress plugin Version 4.1.3.

    Am I doing something wrong or is there a better way to make this work?

    Thanks so much,

    Jack

    Posted 9 months ago #
  2. admin
    Key Master

    I use "Google Analytics for WordPress plugin Version 4.1.3" and it works fine because I am using it myself. Also, the code to track the transaction is there too so I don't see why it wouldn't track the transaction. Are you sure this above transaction did not show up in your analytics account?

    Are you using a caching plugin?

    Posted 9 months ago #
  3. gamehermit
    Member

    I am using W3 Total Cache...and I'm going through CloudFlare...is there settings I need to change with either of these?

    I have the following entries in the Page Cache Section:

    Rejected Cookies:
    ap_id
    cart_in_use
    eMember_in_use

    Cache Exception List:
    wp-comments-popup.php
    wp-links-opml.php
    wp-locations.php

    Thanks,

    Jack

    Posted 9 months ago #
  4. admin
    Key Master

    Your setup looks fine... the following should do the job:

    Rejected Cookies:
    ap_id
    cart_in_use
    eMember_in_use

    WP eStore is only responsible to add the following tracking code to the analytics tracking plugin which it is doing fine after the transaction. Beyond that I don't really have any way of knowing what else could be interfering with the tracking (I really have no way of troubleshooting external analytics account related issues):

    ['_addTrans','1M303855EU897523A','The Pumpkin Lady','0.01','0.00','0.00','Powhatan','VA','United States'],['_addItem','1M303855EU897523A','547','Humdrum Dragon','','0.01','1'],['_trackTrans'];
    Posted 9 months ago #
  5. gamehermit
    Member

    I just received a reply from CloudFlare...I think the problem may have been there. I had CSS minify turned on through their service. They suggested disabling that and seing if that fixes the issue. They also have a feature called "Website Pre-loader" which may be the culprit as well. I will keep you informed when I discover which is the culprit.

    This is becoming a REALLY popular service but they are going to have to address these issues in the future if they indeed causing the issue...which I believe they are. This way if any other eStore customers experience the same thing then hopefully this post will help :)

    Thanks for looking verifying that I had the right settings in place.

    Jack

    Posted 9 months ago #
  6. gamehermit
    Member

    Ok...just ran a transaction through with the CloudFlare CSS Minification disabled (so CloudFlare is doing no Minification now). If the sale gets reported to GA then we know that that was the culprit. If it doesn't show up then it's more than likely the "Website Pre-loader" on CloudFlare.

    Everything from the cart looks fine...the Thank You page, the code from the view source (see below), etc... So I'm certain that it has nothing to do with the cart or the W3 Total Cache.

    I found out that a lot of web hosts (I use HostGator.com) have made CloudFlare available by simply letting the user enable it in CPANEL. CloudFlare is fantastic but I'm hoping that I can find out what settings to look out for when using it and trying to track sales at the same time.

    <script type="text/javascript">//<![CDATA[
    // Google Analytics for WordPress by Yoast v4.1.3 | http://yoast.com/wordpress/google-analytics/
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount','UA-412406-1']);
    _gaq.push(['_trackPageview'],['_trackPageLoadTime'],['_addTrans','36B90383MJ366861M','The Pumpkin Lady','0.01','0.00','0.00','Powhatan','VA','United States'],['_addItem','36B90383MJ366861M','570','Snap','','0.01','1'],['_trackTrans']);
    (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>

    Jack

    Posted 9 months ago #
  7. admin
    Key Master

    I would first disable cloudflare totally and do a test transaction and see if the tracking works fine. That should prove if the issue is indeed coming from cloudflare. Then you can look into the specific section of cloudflare to see which options is introducing the issue. Just remember that you need to give it some time for it show up in your analytic account (the tracking is not real time)

    Posted 9 months ago #
  8. gamehermit
    Member

    Cool....figured out that it was indeed CloudFlare!

    The problem was being caused by having the CSS Minify setting enabled in the CloudFlare settings. To test this I disabled the CSS Minify and emptied the CloudFlare cache...(all the other settings in CloudFlare were left at the default). Next I ran a test transaction. When I checked Google Analytics this morning, the transaction was there :)

    So if anyone is having trouble with sales tracking in GA, and is using CloudFlare..try disabling the CSS Minify settings and see if the problem goes away.

    Hope this is helpful :)

    Jack

    Posted 9 months ago #

RSS feed for this topic

Reply

You must log in to post.

Tips and Tricks HQ  | WP Shopping Cart  | WP Affiliate Software  | WordPress Membership Plugin