VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: toad78 on October 26, 2013, 01:25:17 AM

Title: Google Analytics Reporting Incorrect Pricing
Post by: toad78 on October 26, 2013, 01:25:17 AM
VM 2.022b
Joomla 2.5.x

On this site (https://californiasorganicharvest.com/our-products/organic-prunes/dried-organic-plum-prunes-10-detail.html) there are sale prices on items. Unfortunately, the sale prices of these products are not recording in Google Analytics. Instead, the retail price of the products are. How can I get the Sale Prices of the products to display in GA?

[attachment cleanup by admin]
Title: Re: Google Analytics Reporting Incorrect Pricing
Post by: giako.gd on May 22, 2015, 14:52:25 PM
Hi,
How did you configure virtuemart with google analytics ecommerce?
I have the same problem, but I don't know how to complete the Virtuemart data in this script:
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-49173131-1']);
  _gaq.push(['_trackPageview']);
  _gaq.push(['_addTrans',
    '1234',           // transaction ID - required
    'Acme Clothing',  // affiliation or store name
    '11.99',          // total - required
    '1.29',           // tax
    '5',              // 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
  _gaq.push(['_addItem',
    '1234',           // transaction ID - required
    'DD44',           // SKU/code - required
    'T-Shirt',        // product name
    'Green Medium',   // category or variation
    '11.99',          // unit price - required
    '1'               // quantity - required
  ]);
  _gaq.push(['_trackTrans']); //submits transaction to the Analytics servers

  (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>