Yesterday I switched from my old Google Analytics code to using the Miva module. It seems to be working fine except that the GA console is not showing any ecommerce results.
I have the <mvt:item name="ga_transaction" /> tag at the bottom of the invoice page. It is the stock code:
This is the code that it wrote to the INVC page on my test transaction:
Using a Hex Decoder I translate it as:
Which looks quite correct. I assume that GA understands the Hex encoding? I don't see a setting at the GA website to signify that the data is encoded.
What am I missing?
Kevin Garrett
I have the <mvt:item name="ga_transaction" /> tag at the bottom of the invoice page. It is the stock code:
Code:
<script type="text/javascript"> _gaq.push(['_addTrans', '&mvt:ga_transaction:order_id;', // transaction ID - required '&mvt:ga_transaction:store_name;', // affiliation or store name '&mvt:ga_transaction:order_total;', // total - required '&mvt:ga_transaction:total_tax;', // tax '&mvt:ga_transaction:total_ship;', // shipping '&mvt:ga_transaction:ship_city;', // city '&mvt:ga_transaction:ship_state;', // state or province '&mvt:ga_transaction:ship_cntry;' // country ]); <mvt:foreach iterator="item" array="ga_transaction:orderitems"> _gaq.push([ '_addItem', '&mvt:item:order_id;', // transaction ID - required '&mvt:item:code;', // SKU/code - required '&mvt:item:name;', // product name '&mvt:item:cancat_code;', // category or variation '&mvt:item:price;', // unit price - required '&mvt:item:quantity;' // quantity - required ]); </mvt:foreach> _gaq.push(['_trackTrans']); //submits transaction to the Analytics servers </script>
This is the code that it wrote to the INVC page on my test transaction:
Code:
<script type="text/javascript"> _gaq.push(['_addTrans', '60562', // transaction ID - required '\x45\x73\x70\x72\x65\x73\x73\x6f\x20\x50\x6f\x64\x73\x20\x66\x72\x6f\x6d\x20\x50\x6f\x64\x4d\x65\x72\x63\x68\x61\x6e\x74', // affiliation or store name '9.74', // total - required '0.00', // tax '9.24', // shipping '\x56\x61\x6c\x65\x6e\x63\x69\x61', // city '\x43\x41', // state or province '\x55\x53' // country ]); _gaq.push([ '_addItem', '60562', // transaction ID - required '\x4c\x55\x43\x41\x33\x30\x38', // SKU/code - required '\x4c\x75\x63\x61\x66\x66\x65\x20\x41\x73\x68\x74\x72\x61\x79', // product name '\x4f\x54\x48\x52', // category or variation '0.50', // unit price - required '1' // quantity - required ]); _gaq.push(['_trackTrans']); //submits transaction to the Analytics servers </script>
Using a Hex Decoder I translate it as:
Code:
<script type="text/javascript"> _gaq.push(['_addTrans', '60562', // transaction ID - required 'Espresso Pods from PodMerchant', // affiliation or store name '9.74', // total - required '0.00', // tax '9.24', // shipping 'Valencia', // city 'CA', // state or province 'US' // country ]); _gaq.push([ '_addItem', '60562', // transaction ID - required 'LUCA308', // SKU/code - required 'Lucaffe Ashtray', // product name 'OTHR', // category or variation '0.50', // unit price - required '1' // quantity - required ]); _gaq.push(['_trackTrans']); //submits transaction to the Analytics servers </script>
What am I missing?
Kevin Garrett
Comment