How does Google analytic (the one came with ReadyTheme) module works? I enter my profile but doesn't look like the scripts appear at the end of the page. The 3 items are apply to the page.
Announcement
Collapse
No announcement yet.
Google Analytic module
Collapse
X
-
Re: Google Analytic module
Originally posted by kitdang View PostBy default where does the google analytics item get placed? I can't find it in the global footer or anywhere on the page template. Do I have to add this manually?Mark Hood
Vermont Gear
Comment
-
Re: Google Analytic module
Thanks Mark. Did you use Google tag manager? I was reading it over the weekend and it looks like that's the best way to implement Analytics and a good platform to implement other marketing scripts like google remarketing (aka retarget). Just curious who has done this within Miva.
Comment
-
Re: Google Analytic module
When you install the Google Analytics module it will automatically make 3 changes:
1. Global Footer. It should add this item to the end of the global footer:
<mvt:item name="ga_tracking" />
This is the main item which outputs the global tracking code.
2. If you are using enhanced ecommerce tracking you will also need this in your head tag:
<script type="text/javascript" src="&mvt:global:clientside_url;Module_Code=mvga&a mp;Filename=mvga.js"></script>
3. Then for the ecommerce tracking this item gets inserted on INVC:
<mvt:item name="ga_transaction" />
All three of these should be done automatically when you install the module.
Comment
-
Re: Google Analytic module
I don't believe Google Analyics comes installed with any of the ReadyThemes, you have to manualy turn it on (which is when the item tags get inserted)
So if you applied the readyTheme to a store that already had Google Analytics Installed, it would wipe them out. In that case you would need to add them manually, or uninstall the module and re-install it.
Comment
-
Re: Google Analytic module
I would like to see Miva create an FAQ on how to set up Google Analytics with a Miva 9 store. The most current Miva tutorial (for Miva 5) says "The Analytics Module comes baked into the Miva Merchant software. Google Analytics is a powerful must-have resource for any online store owner and now it's easier than ever to get your Miva store up and running with it." I find that to be a bit of an overstatement as I have tried for 6 months to get it up and running. This should be easy to set up by a mere mortal or with a quick ticket to Miva support.
Miva 9 settings
>In the User Interface>Google Analytics Settings>Mode I have "Universal Enhanced Ecommerce (analytics.js)
>Below is the code I have in User Interface>Google Analytics Tracking Code>Main Template
Google Analytics Settings:
>Admin>Property Settings>in page analytics I have "use enhanced link attribution" and "Start In Page Analytics" on
>see attached for Goals>Goal details
Page analytics and number of visitors seem to work but any advice on how to set up goal details for the Goal Funnel in google analytics for a miva 9 store would be great.
thanks all,
Leroy
<mvt:miva compresswhitespace="off" />
<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','//www.google-analytics.com/analytics.js','ga');
ga('create', '<mvt:item name="ga_jsencode" param="ga_tracking:google_id_unencoded" />', 'auto');
ga('require', 'linkid');
var mvga_basketitems = [
<mvt:foreach iterator="item" array="basket:items">
<mvt:if expr="l.pos1 GT 1">,</mvt:if>
{
'code' : '<mvt:item name="ga_jsencode" param="item:code" />',
'name' : '<mvt:item name="ga_jsencode" param="item:name" />',
'line_id' : <mvt:eval expr="int( l.settings:item:line_id )" />,
'group_id' : <mvt:eval expr="int( l.settings:item:group_id )" />,
'price' : <mvt:eval expr="l.settings:item:price ROUND 2" />,
'quantity' : <mvt:eval expr="int( l.settings:item:quantity )" />
}
</mvt:foreach>
];
var mvga_orderitems = [
<mvt:foreach iterator="item" array="order:items">
<mvt:if expr="l.pos1 GT 1">,</mvt:if>
{
'order_id' : <mvt:eval expr="int( l.settings:item:order_id )" />,
'code' : '<mvt:item name="ga_jsencode" param="item:code" />',
'name' : '<mvt:item name="ga_jsencode" param="item:name" />',
'price' : <mvt:eval expr="l.settings:item:price ROUND 2" />,
'quantity' : <mvt:eval expr="int( l.settings:item:quantity )" />
}
</mvt:foreach>
];
var mvga_productlist = [];
var mvga_tracker = new MVGA_Tracker( '<mvt:item name="ga_jsencode" param="ga_tracking:product_link_prefix" />', '<mvt:item name="ga_jsencode" param="category:name" />', '<mvt:item name="ga_jsencode" param="product:code" />', '<mvt:item name="ga_jsencode" param="product:name" />', mvga_basketitems, mvga_orderitems );
<mvt:if expr="l.settings:page:code EQ 'PROD'">
ga( 'require', 'ec' );
<mvt:foreach iterator="list_product" array="ga_tracking:product_list">
ga( 'ec:addImpression',
{
'id' : '<mvt:item name="ga_jsencode" param="list_product:code" />',
'name' : '<mvt:item name="ga_jsencode" param="list_product:name" />',
'list' : 'Related Products',
'position' : '<mvt:eval expr="int( l.settings:list_product:disp_order )" />'
} );
mvga_productlist.push(
{
'code' : '<mvt:item name="ga_jsencode" param="list_product:code" />',
'name' : '<mvt:item name="ga_jsencode" param="list_product:name" />',
'position' : '<mvt:eval expr="int( l.settings:list_product:disp_order )" />'
} );
</mvt:foreach>
ga( 'ec:addProduct',
{
'id' : '<mvt:item name="ga_jsencode" param="product:code" />',
'name' : '<mvt:item name="ga_jsencode" param="product:name" />',
'category' : '<mvt:item name="ga_jsencode" param="category:name" />'
} );
ga( 'ec:setAction', 'detail' );
<mvt:elseif expr="l.settings:page:code EQ 'CTGY' OR
l.settings:page:code EQ 'PLST' OR
l.settings:page:code EQ 'SRCH'">
ga( 'require', 'ec' );
<mvt:foreach iterator="list_product" array="ga_tracking:product_list">
ga( 'ec:addImpression',
{
'id' : '<mvt:item name="ga_jsencode" param="list_product:code" />',
'name' : '<mvt:item name="ga_jsencode" param="list_product:name" />',
'category' : '<mvt:item name="ga_jsencode" param="category:name" />',
'list' : '<mvt:item name="ga_jsencode" param="ga_tracking:list_label" />',
'position' : '<mvt:eval expr="int( l.settings:list_product:disp_order )" />'
} );
mvga_productlist.push(
{
'code' : '<mvt:item name="ga_jsencode" param="list_product:code" />',
'name' : '<mvt:item name="ga_jsencode" param="list_product:name" />',
'position' : '<mvt:eval expr="int( l.settings:list_product:disp_order )" />'
} );
</mvt:foreach>
<mvt:elseif expr="l.settings:page:code EQ 'OSEL'">
ga( 'require', 'ec' );
var i;
for ( i = 0; i < mvga_basketitems.length; i++ )
{
ga( 'ec:addProduct',
{
'id' : mvga_basketitems[ i ].code,
'name' : mvga_basketitems[ i ].name,
'quantity' : mvga_basketitems[ i ].quantity
} );
}
ga( 'ec:setAction', 'checkout', { 'step' : 1 } );
<mvt:elseif expr="l.settings:page:code EQ 'OPAY'">
ga( 'require', 'ec' );
var i;
for ( i = 0; i < mvga_basketitems.length; i++ )
{
ga( 'ec:addProduct',
{
'id' : mvga_basketitems[ i ].code,
'name' : mvga_basketitems[ i ].name,
'price' : mvga_basketitems[ i ].name,
'quantity' : mvga_basketitems[ i ].quantity
} );
}
ga( 'ec:setAction', 'checkout', { 'step' : 2 } );
<mvt:elseif expr="l.settings:page:code EQ 'INVC'">
ga( 'require', 'ec' );
<mvt:foreach iterator="ga_orderitem" array="ga_tracking:orderitems">
ga( 'ec:addProduct', {
'id' : '<mvt:item name="ga_jsencode" param="ga_orderitem:code_unencoded" />',
'name' : '<mvt:item name="ga_jsencode" param="ga_orderitem:name_unencoded" />',
'price' : '<mvt:item name="ga_jsencode" param="ga_orderitem:price" />',
'variant' : '<mvt:item name="ga_jsencode" param="ga_orderitem:variant_label_unencoded" />',
'quantity' : '<mvt:eval expr="l.settings:ga_orderitem:quantity" />'
} );
</mvt:foreach>
ga( 'ec:setAction', 'purchase', {
'id' : '<mvt:eval expr="int( l.settings:ga_orderitem:order_id )" />',
'revenue' : '<mvt:item name="ga_jsencode" param="ga_tracking:order_total" />',
'affiliation' : '<mvt:item name="ga_jsencode" param="store:name" />',
'tax' : '<mvt:item name="ga_jsencode" param="ga_tracking:total_tax" />',
'shipping' : '<mvt:item name="ga_jsencode" param="ga_tracking:total_ship" />'
} );
</mvt:if>
ga( 'send', 'pageview', { 'page':'/<mvt:item name="ga_jsencode" param="ga_tracking:url_override_unencoded" />' } );
</script>Attached Files
Comment
-
Re: Google Analytic module
Originally posted by Mark Hood View PostFor the record I had Google technical support set this up to make sure it was tracking everything.Leslie Kirk
Miva Certified Developer
Miva Merchant Specialist since 1997
Previously of Webs Your Way (aka Leslie Nord leslienord)
Email me: [email protected]
www.lesliekirk.com
Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr
Comment
-
Re: Google Analytic module
Originally posted by GDesigns View PostOr, you could contact us and we can set it up for you ;)Leslie Kirk
Miva Certified Developer
Miva Merchant Specialist since 1997
Previously of Webs Your Way (aka Leslie Nord leslienord)
Email me: [email protected]
www.lesliekirk.com
Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr
Comment
-
Re: Google Analytic module
Originally posted by lesliekirk View PostGoogle Technical support can step through the Miva configuration? If so, whom did you speak with? I suspect a lot of people would like a direct number (me included).
The Google techs did a screen share and fixed it themselves in my Miva admin while I simply watched.Mark Hood
Vermont Gear
Comment
Comment