Google Analytics with MarketPress not displaying ecommerce data

The current MarketPress has an option "Google Analytics Ecommerce Tracking" which I have enabled (using (Asynchronous Tracking Code"), and eCommerce is enabled in the site GA settings, but I'm not getting any GA ecommerce data for orders that have cleared MarketPress. Anyone have any experience getting the MarketPress GA config working?

  • 3SixtyEvolve
    • New Recruit

    Hi Jason

    I believe you've had a few threads regarding this.

    I will try to go through the steps that I have available to me, to see if you missed any step:

    1) If you already use Google Analytics for your website, you can track detailed ecommerce information by enabling this setting - Admin Dashboard » Products » Store Settings » General Settings » Miscellaneous Settings.

    2) Choose whether you are using the new asynchronous or old tracking code.

    3) Before Google Analytics can report ecommerce activity for your website, you must enable ecommerce tracking on the profile settings page for your website.

    4) Also keep in mind that some gateways do not reliably show the receipt page, so tracking may not be accurate in those cases. It is recommended to use the PayPal gateway for the most accurate data.

    Then, as my colleague Arun previously mentioned to you, there is a very good series that would give you an in-depth idea of how this all works:

    http://cutroni.com/blog/2008/01/13/google-analytics-e-commerce-tracking-pt-1-how-it-works/

    (check Part 2,3 and 4)

    Also, as Arun previously asked, which payment gateway are you using? Try using Paypal Gateway (in Sandbox mode) and see if that works?

    Threads related to this topic can be found here:
    MarketPress not providing ecommerce data to Google Analytics
    Google Analytics integration with MarketPress and Membership
    MarketPress integration with Google Analytics eCommerce

    Let me know how you get on after following all the steps and the in-depth series. Also, let us know what payment gateway you're using and we can take it from there.

    All the best and look forward to receive your feedback.

    Gina

  • Jason
    • Design Lord, Child of Thor

    OK, this is all great general information, but it does nothing to tell me how to configure MarketPress to provide GA eCommerce the data it needs. How do you add the code to the receipt page? What are the MarketPress field names to use? I'm not a developer, so I'm going to need a step by step tutorial on this.

    Like I said in another thread, WPMU DEV is advertising that MarketPress integrates with Google Analytics eCommerce, but it's obvious that this is not really true - it's not an easily configurable setting in the admin and seems at best to be something that must be coded by a developer, which means it should not be touted as a feature of the plugin.

    Am I missing something here? Please provide some more specific guidance on how to get the eCommerce code loaded on the MarketPress receipt page.

    FYI - I'm using the Asynchronous Tracking Code setting.

  • 3SixtyEvolve
    • New Recruit

    Hi Jason

    Thank you for your latest post. We are in the process of updating the documentation for all the plugins and themes and your questions will help considerably in getting more information on the MarketPress Google Analytics Installation and Use Guide.

    Please allow me to follow up with our senior support team for answers to all your questions. I will revert back to you at the earliest.

    Thank you and have a great day.

    Talk soon!

    Gina

  • aecnu
    • WP Unicorn

    Greetings Jason,

    Just touching base with you to let you know that we have not forgotten about you nor your issue.

    Thank you for your patience as the brand new WPMU Dev support team (a little over a month) gets the documents and other details worked out for the over 300+ plugins and themes that we offer which has proven to be a monumental task.

    Your discrepancy with the description claiming is advertising that MarketPress integrates with Google Analytics eCommerce is duly noted.

    Thank you for being a WPMU Dev Member!

    Cheers, Joe

  • aecnu
    • WP Unicorn

    Greetings Jason,

    Thank you for your patience and I have gone ahead and alerted the lead developer of Market Press now that the smoke is clearing from the new site and he may be able to address the issue or figure out where to turn to address the issue.

    Thanks again for your patience and I hope to get him and his invaluable advice in here asap.

    Cheers, Joe

  • Aaron
    • CTO

    Ok, Looks like your GA tracking code is setup right. I can't really test the MP code output without spending a bundle. Here are some things to confirm for me:
    - MP setting is set to Asynchronous
    - Ecommerce is enabled in the associated GA account settings
    - What gateway are you using?
    - Are you using a global cart?
    - Most important, can you check the source of the confirmation page, and paste the whole thing in pastebin or something for me to see? I want get alook at if the ecommerce vars are being printed.

  • Jason
    • Design Lord, Child of Thor

    - MP is set to Asynchronous - yes
    - Ecommerce enabled in GA - yes
    - Gateway - PayPal Express Checkout
    - Global cart - what do you mean by this?
    - Can I post the code in the thread here? Or does it need to be somewhere else?

  • Aaron
    • CTO

    Ok, perfect. I can see the tracking code is printing just fine:

    <script type="text/javascript">
                            _gaq.push(["_addTrans",
                          "663229aba4fd",                  // order ID - required
                          "True Food Solutions",            // affiliation or store name
                          "17.85",                        // total - required
                          "0.85",                          // tax
                          "",                     // shipping
                          "Salem",    // city
                          "VA",   // state or province
                          "US"  // country
                        ]);_gaq.push(["_addItem",
                                                      "663219aba4fd", // order ID - necessary to associate item with transaction
                                                      "InherittheLand",                         // SKU/code - required
                                                      "Inherit the Land",      // product name
                                                      "",                                 // category
                                                      "17.00",               // unit price - required
                                                      "1"             // quantity - required
                                                    ]);_gaq.push(["_trackTrans"]);
                            </script>

    So it doesn't seem to be marketpress. I can see something funny that just might be your issue though. Here is the tracking code being output in your header:

    <script type="text/javascript">
                                    //<![CDATA[
                                    var _gaq = _gaq || [];
    
                                                                            _gaq.push(['b._setAccount', 'UA-xxxxxxx-1']);
                                            _gaq.push(['b._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>

    It seems to be doing something non-standard, adding a "b." before the tracking calls.

    _gaq.push(['b._setAccount', 'UA-xxxxxxx-1']);
     _gaq.push(['b._trackPageview']);

    I think that might very well be the problem. For the ecommerce tracking to work you would need to make sure it outputs in the standard format, like:

    _gaq.push(['_setAccount', 'UA-xxxxxxx-1']);
     _gaq.push(['_trackPageview']);

    Not sure what your using to add the tracking code, but you need to either mod it, or use another solution like our plugin: https://premium.wpmudev.org/project/google-analytics-for-wordpress-mu-sitewide-and-single-blog-solution/

  • Jonathan Potter
    • Site Builder, Child of Zeus

    Hello Aaron,

    I've reciently started working with Jason on this site, and we've finally gotten around to getting this issue fixed (our problem is fixed, but I'm re-opening the ticket to see if you can fix integration with the WPMU Dev Google Analytics plugin). Here's the low down:

    Jason was actually using the WPMU Dev Google Analyitcs Plugin, but the catch is that truefoodsolutions.com is on a multisite installation, and the GA plugin is configured to allow multiple GA accounts, as per the Google Analytics plugin feature set. (See: https://premium.wpmudev.org/project/google-analytics-for-wordpress-mu-sitewide-and-single-blog-solution/ )

    The WPMU Dev Google Analytics plugin uses the standard API for tracking in multiple accounts, which you can read the documentation on here: https://developers.google.com/analytics/devguides/collection/gajs/#MultipleCommands . This multiple GA account code is what was including the b._ in the code above.

    So to fix the situation, we switched to using a plugin that just supported a single GA account.

    Anyway, (pardon the rambling--it's the middle of the night here!):

    You were right in that the b. was messing things up, but it is standard Google Analytics functionality, so if you could get these two great plugins working together, that would be fantastic!

    Obviously, we'd rather use the WPMU Dev GA plugin, and get the additional functionality it provides, but it's no longer an urgent need.

    Thanks for your help on this one!

    - Jonathan

  • aecnu
    • WP Unicorn

    Greetings jonathan.pottervilla,

    Thank you for your additional feedback and input, it is indeed appreciated.

    It is obvious that this is a Google Analytics plugin problem that you have also proven and that plugin is indeed maintained and coded by a different lead developer and not by Aaron.

    Therefore I respectfully request that you create a new ticket which you can copy and paste your last post within and a link within to this ticket so that I can reassign it to the applicable plugin and lead developer.

    Thank you for your understanding and may we get this issue with the Multisite Analytics plugin resolved quickly but safely.

    Cheers, Joe

  • Jonathan Potter
    • Site Builder, Child of Zeus

    Don't know why I didn't get notified of your response here, Joe.

    The way I understand it: the WPMUDev Google Analytics plugin is operating correctly according to Google's API. Marketpress needs to change to accommodate that API as well, if A) these plugins are going to be compatible and B) your Google Analytics plugin is going to retain it's excellent feature set on MU Wordpress.

    I'd like to get Aaron's take on this, and if he thinks that there needs to be changes to the Google Analytics plugin, I'll happily create a new ticket to flag the other developer.

    - Jonathan

    yoshimotor: It kind of died. :slight_smile:

  • aecnu
    • WP Unicorn

    Greetings Johnathon,

    Thank you for the response, it is greatly appreciated.

    Yes could you please create a new ticket and feel free to copy and paste any relevant information from this ticket into the new one and we should assign it to the Google Analytics topic so we can get the relative lead developer on it if necessary of course.

    In addition, could you please post the link to the new ticket here on this thread?

    Thank you and look forward to be addressing this in the new ticket.

    Please advise.

    Cheers, Joe

  • Jonathan Potter
    • Site Builder, Child of Zeus

    Ok, here's a ticket for the GA side of this: https://premium.wpmudev.org/forums/topic/google-analytics-and-marketpress#post-282629 .

    Thanks, Aaron, I always look forward to the new versions of your excellent plugin, they always get better. :slight_smile:

    Joe, I'm not sure, but I think Aaron's solution in the next version will take care of it. If you agree that's the case, feel free to close the other ticket I just created.

    - Jonathan

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.