Knowledgebase:
Google Analytics not functioning in Miva version 9.1 or 9.2
Posted by , Last modified by on 16 January 2015 10:36 AM

If you have recently updated from Miva version 9 to Miva version 9.2 and you find that your Google Analytics module has stopped functioning. Here are some things to consider.

In Miva version 9 Google Analytics Settings has two options in the Mode drop down.

Universal(analytics.js)
Classic(ga.js)

If you are using Universal(analytics.js)the Google Analytics Tracking Code template will look something like this.


In Miva version 9.1 or 9.2 Google Analytics Settings has three options in the Mode drop down.
Universal(analytics.js)
Universal Enhanced Ecommerce(analytics.js)
Classic(ga.js)

If you are using Universal(analytics.js)the Google Analytics Tracking Code template will look something like this. Note that the information in this section has changed causing your module to not function properly.

 

Q: I recently updated our Google Analytics module to the new settings of ‘Universal Enhanced Ecommerce’ and is saying that their goal funnel in Google Analytics is not working you will need to update their Analytics code.

 

A: The default settings for ‘Universal Enhanced Ecommerce’ passes the URL to Google as the page like this - ga( 'send', 'pageview' );

 

The goal funnel is set to look at what is being passed as the pageview and check to see for the page code that is being passed. When going through the checkout we typically do not pass the page code in the URL so you will need to update the Google Analytics code to pass the page code to Google:

 

<mvt:if expr="(l.settings:page:code EQ 'BASK') OR (l.settings:page:code EQ 'ORDL')OR (l.settings:page:code EQ 'OCST') OR (l.settings:page:code EQ 'OSEL') OR (l.settings:page:code EQ 'OPAY') OR (l.settings:page:code EQ 'INVC')">

                ga( 'send', 'pageview', '&mvta:page:code;' );

<mvt:else>

                ga( 'send', 'pageview' );

</mvt:if>

 

This code will pass the page code to Google Analytics and if you have the goal funnel set up to check the regular expression of the page code it should work correctly.

 

NOTE: If the store has a custom checkout like a one page or a three page make sure you adjust the code accordingly.

 



Attachments 
 
 universal.html (18.68 KB)
(1 vote(s))
This article was helpful
This article was not helpful

Help Desk Software by Kayako support.miva.com/supportsuite/index.php?