Hi,
I'm a bit perplexed by the complexity of this all.
The normal google tracking code is so simple to install, why is this e-commerce code so complex.
Isn't there someone how just has a simple snippet of code that work with VM.
I tried putting the google sample code into the extra payment field in payment methods>configuration.
It works and shows in analytics e-commerce tracking, but only gives the values as mentioned in the script.
I know I have to change these values, but don't know the proper ones to work with the VM cart or checkout.
Is there any one that can help me on this one?
best,
Harald
P.S.
This is the Google sample code I pasted into the extra payment field:
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol ) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try{
var pageTracker = _gat._getTracker("UA-xxxxx-x");
pageTracker._trackPageview();
pageTracker._addTrans(
"1234", // order ID - required
"Womens Apparel", // affiliation or store name
"11.99", // total - required
"1.29", // tax
"15.00", // shipping
"San Jose", // city
"California", // state or province
"USA" // country
);
// add item might be called for every item in the shopping cart
// where your ecommerce engine loops through each item in the cart and
// prints out _addItem for each
pageTracker._addItem(
"1234", // order ID - necessary to associate item with transaction
"DD44", // SKU/code - required
"T-Shirt", // product name
"Olive Medium", // category or variation
"11.99", // unit price - required
"1" // quantity - required
);
pageTracker._trackTrans(); //submits transaction to the Analytics servers
} catch(err) {}
</script>