This plugin aims to solve this to allow you to use your own JavaScript or solution to integrate your analytics tracking.
The idea is that the page outputs the variables you need, sanitized and ready to consume JavaScript, and you pass them along to the analytics packages..
This plugin does not do anything except publish the values you need as JavaScript variables to make it useful you need to incorporate it into analytics package and refer to the variables..
WCPAYLOAD with object structure which, at minimum, has member type which determines the structure..
The types cart and checkout are nearly identical and place the majority of the in the cart member order-confirmation is similar, but places the majority of the in the order member..
You can view the source file output-samples php in the directory to see samples of the structure that is output.
Extract the zip file and just drop the in the wp-content plugins directory of your WordPress installation and then activate the plugin from Plugins page..
There is no configuration of this plugin, but to confirm it's working you can view the source of the cart, checkout, and confirmation page and look for global variable called WCPAYLOAD on the page.
You need to then connect this to your preferred analytics package to add the events as you wish...
Browse the code, check out SVN repository, or subscribe to the development log by RSS...
Read more