News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

VirtueMart 3 - transaction tracker for Google Analytics

Started by Three_d, November 28, 2014, 16:40:36 PM

Previous topic - Next topic

Three_d

Hello,

In VirtueMart 1.1.9 / Joomla 1.5.26 I used the following plugin to track conversions for Google Analytics:
http://extensions.joomla.org/extensions/extension-specific/virtuemart-extensions/virtuemart-stats/20861.

But it isn't compatible with VirtueMart 3 / Joomla 3.3.6.
I've searched the forum / internet but didn't find something which should certainly work as simple as the above plugin.
Does someone know a similar simple plugin or a step by step solution to track the conversions for Google Analytics in VirtueMart 3?

Jeroen


jjk

Personally I always recommend to use http://piwik.org/, because with piwik you own the tracking data instead of notifying Google about every click on your website.
There is a free piwik plugin for VirtueMart here: http://extensions.virtuemart.net/statistics
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

Enriko

Dear jjk,

I also prefer Piwik, because it is working perfect for the VM2 version.

I installed it now also on a vm3 website, but this is not compatible yet.
When opening a product I get below error
Notice: Trying to get property of non-object in ..../plugins/system/istraxx_vmpiwik/istraxx_vmpiwik.php on line 273


When going to the cart I get this error
1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM JOIN lepch_virtuemart_categories using (`virtuemart_category_id`) WHERE =' at line 1 SQL=SELECT FROM JOIN lepch_virtuemart_categories using (`virtuemart_category_id`) WHERE = "9"


so currently this is also not compatible with VM3.

Would you know if this plugin can and will be updated?

Kind regards,
Enriko

jjk

Quote from: Enriko on January 02, 2015, 21:59:44 PM
so currently this is also not compatible with VM3.
Would you know if this plugin can and will be updated?

I wasn't aware of this. Don't know if the plugin will be updated soon. I just sent a corresponding question to the developer.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

GJC Web Design

You can add your Google tracker code to the confirm $html in your payment plugin if your only wanting to track completed sales
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

alatak

Hello

Yes you are right. The extensions is not compatible actually with J3.
I have done some tests also with the latest Piwik
I will do a release, but i have to check with J25+VM2, and J25/J3 +VM3.
I will keep you informed when a new release is available.


Eukereku

Hi alatak,

Do you have a possible date for the release of you J3 + VM3 plugin?

I already have a production site online using J3 + VM3 (with Piwik 2.10.0) and if you need a beta tester i'm available.

kratzi

Is the Piwik tracker compatible with VM 2.6.14

I guess alatak remembers we put a lot of time and effort to make the Plugin running but it never did perfectly. Unfortunately the Piwik team was as bad as possible to support the creation of the Plugin and even didn't supply a documentation.

So if there are any news for the Plugin I would be of course very interested.

QuoteYou can add your Google tracker code to the confirm $html in your payment plugin if your only wanting to track completed sales

Would you have a piece of code to see how it should look like and where it needs to be inserted to track google analytics.
Do you also have a solution to track abandonned carts?

Thank you

kratzi

GJC Web Design

it varies with every payment plugin - but you just need to find where the final confirm html is formed and add the code

in the latest vm3 paypal it is plugins\vmpayment\paypal\paypal\tmpl\stdresponse.php

authorize it is in the response received function $html
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

kratzi

Thank you for your time and input.

Don't I need to define for google analytics the variables. F.e. what the total amount is called in VM code and the variables for the products in the cart etc.
Perfect solution would be to forward data like total cart price, sku, product, product price to google analytics.

Just to clearify: Is this the code we are talking about?

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXX-X']);
  _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>


Thank you

kratzi



GJC Web Design

yes - you would echo that out and replace the data with the correct values..
you need to see what is available in the particular file as values

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation