Google Analytics for WordPress plugin not tracking WP e-Commerce transactions?
Wednesday, 11th August 2010I recently tried out Joost de Valk’s Google Analytics for WordPress (version 4) and was happy to see it supported ecommerce tracking for WP e-Commerce.
I had the latest version of WP e-Commerce installed, version 3.7.6.7, and configured the analytics plugin to track transactions but for some reason my ecommerce purchases were not being tracked by Google Analytics.

I did a bit of digging around and discovered the Analytics plugin was looking for the global variable $cart_log_id from which it could get the transaction details, but this variable did not seem to exist (it did seem to be in pre 3.7.6.x versions of WP e-Commerce though).
I have submitted a patch for this for the forthcoming WP e-Commerce version 3.8 (which is currently in beta and looking great, by the way).
In the meantime, if you’re having this problem here’s how you can fix it…




