Categories: Google Analytics and Ecommerce Tracking

Google Analytics and E-commerce Tracking in Miva Merchant

If you have gone through some of previous blog, you might have seen how to install google analytics, e-commerce tracking and conversion tracking in various CMS like Magento, Shopify and so on.

In this blog, you are going to see how to add universal analytics tracking code as e-commerce tracking code on Miva Merchant Center. Since Google analytics is getting much more popular in digital marketing and e-commerce analysis, that’s why Miva has given one individual module to implement google analytics tracking (Asynchronous Google Analytics Tracking Code ) as well as e-commerce tracking.

Miva Merchant

There is 3 main steps to install universal google analytics and e-commerce tracking code:

  • Enable Google Analytics module( option).
  • Upgrade to Universal Google Analytics Code.
  • Upgrade to Universal Google Analytics E-commerce Tracking Code.

Enable Google Analytics module

To Enable Google Analytics Module follow all below steps:

  • Login to Miva Merchant Admin.
  • Click on utility (menus in left of admin panel).
Miva Merchant Utility
  • Search for google analytics and check Google Analytics option.
Miva Merchant Google Analytics Enable
  • Click on update button( Bottom of the page).
    After clicking on update button you will get 3 new Tab
    • Google Analytics Settings
    • Google Analytics Tracking Code
    • Google Analytics Ecommerce Tracking Code
  • To enable Google analytics:
    Click on Google Analytics setting tab and add Google analytics Tracking ID(e.g UA-XXXXXX-X) in box and click on update button.
Miva Merchant Google Analytics Enabling

Upgrade to Universal Google Analytics Code.

By default, Asynchronous Google Analytics Tracking code along with E-commerce Tracking code will get Installed on your website after following above steps.

To upgrade Asynchronous to Universal Google Analytics code  click on Google Analytics Tracking Code Tab then click on Advance mode link.

Miva Merchant – Google Analytics Tracking Code

Replace the code of Main Template box to blow code then click on update button.

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  ga('create','&mvt:ga_tracking:google_id;','auto');
  ga('send','pageview'&mvt:ga_tracking:url_override;);

</script>

Upgrade to Universal E-commerce Code.

Since Google Analytics Tracking code have been upgraded to Universal Tracking Code, now only one thing is left to upgrade i.e Asynchronous E-commerce Tracking code to universal Tracking code.

To upgrade e-commerce tracking code follow below steps:

Click on Google Analytics E-commerce Tracking Code Tab.

Miva Merchant – Google Analytics Ecommerce Tracking Code

Replace the code in Ecommerce Tracking Template box with below code.

<script type="text/javascript">

  ga('require', 'ecommerce', 'ecommerce.js');

  ga('ecommerce:addTransaction', {
    id: '&mvt:ga_transaction:order_id;', // Transaction ID - this is normally generated by your system.
    affiliation: '&mvt:ga_transaction:store_name;', // Affiliation or store name
    revenue: '&mvt:ga_transaction:order_total;', // Grand Total
    shipping: '&mvt:ga_transaction:total_ship;' , // Shipping cost
    tax: '&mvt:ga_transaction:total_tax;'  // Tax.
  }); 


  <mvt:foreach iterator="item" array="ga_transaction:orderitems">
    ga('ecommerce:addItem', {
    id: '&mvt:item:order_id;', // Transaction ID.
    sku: '&mvt:item:code;', // SKU/code.
    name: '&mvt:item:name;', // Product name.
    category: '&mvt:item:cancat_code;', // Category or variation.
    price: '&mvt:item:price;', // Unit price.
    quantity: '&mvt:item:quantity;' // Quantity.
  }); 
  </mvt:foreach>
  ga('ecommerce:send');

</script>

Congratulation,If you have completed above steps because you have successfully upgraded your Google Analytics Tracking code along with Ecommerce Tracking Code.

Note: I have implement these codes on multiple website and it is working fine, still if you are getting any error feel free to edit these code or leave your comment via comment box or Get in touch form. Also your valuable feedback will be heartily appreciated .

Notes On Click

Share
Published by
Notes On Click
Tags: Ecommerce trackinggoogle analyticsMiva Merchant

Recent Posts

  • Adword Conversion Tracking
  • Google Adwords Remarketing

Conversion and Remaketing code in BigCommerce

In this blog, you will see how to add Adwords Conversion Tracking and Remarkeing Code in BigCommerce.BigCommerce is one of…

8 years ago
  • Google Analytics and Ecommerce Tracking

Ecommerce Tracking in OpenCart 2.3

Around 6 months back, I had published an article on “How to add GA e-commerce tracking in Opencart“. I am really thankful…

8 years ago
  • Google Analytics and Ecommerce Tracking

Google Analytics Definition and Common Terms

 If you have gone through our previous blog about Google Analytics, you might have sound understanding about Google Analytics and how it…

8 years ago
  • Google Analytics and Ecommerce Tracking

What is Google Analytics and it’s Features?

Do you want to know more about your visitors and how your content is performing?​ Whether you run a website…

8 years ago
  • Google Analytics and Ecommerce Tracking

How to Add Google Analytics in BigCommerce

In this blog, you will see how to add Google Analytics and E-commerce Tracking Code  in BigCommerce. BigCommerce is one of the…

8 years ago
  • Google Analytics Event Tracking
  • Google Tag Manager (GTM)

Contact Form 7 Event Tracking Via GTM

In the last post, you had seen How to add event tracking in gravity form via Google Tag Manager. Now in this…

8 years ago