24/7 Support: 800.608.6482

How To Guides

Try our new AI assistant by clicking the chat icon in the lower right corner.

How To Guides

Google Analytics Tutorial

Google Analytics is a powerful online resource for any online store owner and now it's easier than ever to get your Miva Merchant store up and running with it.


Installing the Module

Choose Mode: Classic vs Universal vs Enhanced

Page Template Changes

Setting Up Goals/Funnels

Turning On Ecommerce Tracking

Verify Tracking


Google Analytics is a free web analytics service offered by Google that tracks and reports website traffic. Google launched the service in November 2005 after acquiring Urchin. Google Analytics is now the most widely used web analytics service on the Internet.

Google Analytics and related products can help you turn customer insights into actionable solutions for your business.


Installing the Module

Installing the Google Analytics Module:

The Google Analytics module starts off deactivated by default so in order to be able to use it you'll need to install the module.

Click on "Menu," then scroll down to "Utilities."

Google Analytics

In Utility Settings, click on the "Add/Remove Modules" tab. Now search for the "Google Analytics" module. Click on the "Install" button.

Google Analytics

When you install the module it will automatically add all the necessary page template changes for you including inserting the base tracking code as well as ecommerce tracking.

Once you're installed the Google Analytics module, two new tabs will appear in your Utility Settings Admin; Google Analytics Settings and Google Analytics Tracking Code.

Google Analytics Settings:

Here you'll need to add your Google Analytics ID number under the "Google Analytics Settings." You will need to log into your Google Analytics account to get this ID.

Google Analytics

Select Mode: Classic vs Universal vs Enhanced

There are 3 versions of Google Analytics supported by the module Classic, Universal & Enhanced. These are selected under the Mode. 99% of the time you are going to want to leave it on Universal. The classic version is depreciated by Google and should not be used.

Google Analytics


This is the default mode and should be used for most stores. This mode allows you to track detailed information about your customers as well as ecommerce tracking.


This setting gives you access to much more analytics detailed data. More information can be found here:



Classic is the "old" implementation of Google Analytics and it only supported for legacy purposes. If you are using classic it is recommended you upgrade to Universal.

Page Template Changes

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:
  2. This is the main item which outputs the global tracking code.

  3. If you are using enhanced ecommerce tracking you will also need this in your head tag:
  4. Then for the ecommerce tracking this item gets inserted on INVC:
All three of these should be done automatically when you install the module.

You should only need to manually add these if you have overwrote them in your page templates.

Setting Up Goals/Funnels

Sign in to Google Analytics:

Select the Admin tab and navigate to the desired account, property and view.

In the VIEW column, click Goals.

Click + NEW GOAL or Import from Gallery to create a new Goal, or click an existing Goal to edit its configuration.

You have 2 basic options for creating Goals:

Option 1: Goals from a template:

Follow the steps to create a new Goal (above), then:

Select a Template from the list.

Click Next step to continue setting up your Goal.

Goal templates are designed to help you set actionable Goals that meet standard business objectives. You can edit any template field before saving a Goal. The Goal categories (Revenue, Acquisition, Inquiry, Engagement) are the larger business objectives that motivate the Goal templates. Use them as an organization tool to help you think about the purpose of your Goals. Try to create at least one Goal for each category to get a better understanding of how users interact with your content. These categories don’t affect any data or your reports.

Option 2: Custom Goals:

Follow the steps to create a new Goal (above), then:

Select Custom from the list of options.

Click Next step, then select a Goal Type.

Click Next step again to continue setting up your Goal.

Goal configuration options

Goal name:

It's a good practice to name your Goals in a way that helps you distinguish one Goal from another. This can help make your Goal Conversion and Flow reports more easily understood.

Goal slot ID:

Every Goal you create is assigned a numeric slot ID. You can have a maximum of 20 Goal slots, grouped into sets of up to 5 individual Goals. Goal sets allow you to categorize the different types of Goals for your site.

Goal types:

As described in About Goals, there are a number of different Goal types, each used for a different kind of action you can measure. If you use a template, the best fit will be suggested for you. If you set up a custom Goal, select the type that best fits the action you need to track. Expand the sections below to learn more about the details of each Goal type.

Goal value:

Assigning a monetary value to a Goal gives you a way to compare conversions and measure changes and improvements to your site or app. You assign a value during the setup process. There are special considerations when setting up an Event Goal or a Goal that involves Ecommerce Tracking. Expand the sections below to see these considerations.

Verify your Goal:

Click Verify this Goal to test your Goal setup. This will calculate a conversion rate for this Goal based on your data from the past 7 days.

Below is an example of a Checkout Funnel Goal. You will need to update the URLs to reflect the URI/SEO settings your site uses.

Google Analytics

This test is based on data in your account, and not actual conversion data. It is not a projection of how well your Goal will perform.

Revise or Edit a Goal:

You can revise a Goal you are in the process of defining by clicking the Edit link next to a previous step.

To edit an existing Goal, navigate to the Goals list and click the Goal name to follow the step by step flow again.

Recording status:

As soon as you create a Goal, it starts recording data. You can pause a Goal by changing the recording status to OFF. No data is recorded for a Goal when turned off.

To change a Goal's recording status:

Because Goal conversions are calculated and applied as your data is processed, it is not possible to delete a Goal. If one of your Goals becomes obsolete or irrelevant, turn off recording instead.

Share and import Goals:

After you have created and saved a Goal, you can share it with other Google Analytics users, just as you can other assets, such as Dashboards, Segments, Channel Groupings, etc. To share a Goal:

Navigate to your Goals:

Select the checkbox for the Goal you wish to share (you can select multiple Goals).

Click Share.

Choose your sharing option:

The Share button is hidden until you select one or more Goals.

When you share a Goal, only the configuration information is shared. Your data remains private.

Importing Goals from the Solutions Gallery:

Instead of creating your own Goals, you can import them from the Solutions Gallery. When you import a Goal from the Solutions Gallery, only the Goal template is imported into your account. None of the conversion data from the source account is imported. You can then use imported Goals to track the conversions in your own Google Analytics account.

Goal slot ID for imported Goals:

When you import a Goal from the Solutions Gallery, it will be assigned to the next available Goal slot ID. You can select a different, unused slot ID, or you can overwrite an existing slot ID.

Overwriting a used Goal slot ID with a new Goal does not change any previous conversion data. Be sure to keep track of when you make any change to an existing Goal.

Turning On Ecommerce Tracking in Google


By default Miva will add the code you need to track ecommerce data. However, there is a setting in Google Analytics which must also be enabled. Login to Google Analytics, click on Admin then from the View column choose "Ecommerce Settings"

Ecommerce Settings

Here you can enable ecommerce tracking if it is not on already:

Enable Ecommerce

Verify Tracking

Verify everything is tracking properly. You should be able to look at Real Time Analytics data and see page views immediately. Once your first order comes in, verify all the commerce data is being tracked as well.

Looking for Developer Docs?

We have a whole section for that, including: Developer Training Series, Template Language docs, Module Development tutorials and much, much more.

Head to the Developer Section

This website uses cookies to identify visitors, track visitors to our website, store login session information and to remember your user preferences. By continuing to use this site you agree to our use of cookies. Learn More.

This website uses cookies. By continuing to use this site you agree to our use of cookies. Learn More.


Copyright © 1997 – 2024 Miva®, Miva Merchant®, MivaPay®, MivaCon®, Camp Miva®, Miva Connect®, Miva, Inc. All Rights Reserved.