Installing Google Analytics In Miva Merchant 5.5

Today you will learn how to implement Google Analytics for Miva Merchant 5.5 so that you get important data including e-commerce tracking, site search and a funnel of the standard checkout steps. Let’s start with an outline of the steps:

  1. Create a Google Analytics Account
  2. Copy the Google Analytics Code From Google
  3. Customize Google Analytics Code For Miva Merchant
  4. Insert Google Analytics Code in Miva Merchant
  5. Change Google Analytics Account Settings
  6. Create a Goal & Funnel

Step 1: Create a Google Analytics Account

The first step is to create a Google Analytics account and I recommend using your existing Google Account if you already have one; otherwise, you will be creating one as part of the Google Analytics sign up. Assuming you have a Google Analytics account already you can skip this step.

Step 2: Copy the Google Analytics Code From Google

Once you create an account you will be presented with the Google Analytics Code as shown below. All you need to do is copy your Google Analytics account number, UA-99999999-1, and paste in a text editor such as notepad. Here is a screen shot to show you what to look for:

Copy Google Analytics tracking code example

click to enlarge

Keep this page of Google Analytics open because you will be coming back to it in step 5.

Step 3: Customize Google Analytics Code For Miva Merchant

Next is to customize the Google Analytics code to track orders, site search and checkout steps. This is going to be really easy because you only need to change one line of the custom code below then copy & paste. Start by downloading the custom code here, open the file and locate the following line:

var pageTracker = _gat._getTracker("UA-99999999-1");

Replace “UA-99999999-1″ with the number you copied in Step 2 above from your Google Analytics Account. Now copy all of this code so it can be pasted in the next step.

Step 4: Insert Google Analytics Code in Miva Merchant

Next you want to login to your Miva Merchant Admin so you can edit the Global Footer of your store. Once you login click on your store name and then Global Footer. In the example below the store name is “Book Store”:

Miva Merchant Store Admin

click to enlarge

Most stores will have some code in the global footer; go to the very end of all the existing code and paste the code you copied in step 3. Then Click the Update button. At this point you are done with the edits necessary inside the Miva Merchant admin.

Step 5: Change Google Analytics Account Settings

Now you want to go back to the Google Analytics account page from Step 2 and click the “Save and Finish” button. Next click Edit on your Profile screen; here is a screen shot:

Edit Google Analytics Profile

click to enlarge

Once you are on the Edit Profile screen there are five area’s you need to change.

A picture is worth a thousand words so click the image below for an enlarged screenshot of what you need to change.

Google Analytics Profile changes

Edit Profile

When your Edit Profile screen mimics the above settings click Save Changes. Congratulations, you now have e-commerce and site search tracking setup for Google Analytics. Now you just need to setup a goal and funnel to track the checkout steps.

Step 6: Create a Goal & Funnel

Once you click Save Changes on the Edit Profile screen from step 5 scroll down the page and click Add Goal to start the Goal and Funnel creation as seen in the image below:

Google Analytics Add Goal

Add Goal

Now you want to make 5 changes on the Goal Settings page:

  1. Name the Goal
  2. Set Goal Type to URL Destination
  3. Set Match Type to Exact Match
  4. Set Goal URL to
    /checkout/invoice.html
  5. Click “Yes, create a funnel for this goal”

Here is a screen shot to use as a visual aid:

Google Analytics Edit Goal Settings

click to enlarge

Now you want to add each page of the checkout process as a step of the funnel; here is what the first step (the BASK page) should look like:

Google Analytics Add Goal Steps

Adding Goal Steps

Click Add Goal Funnel Step 4 times and fill in each step. Here is the copy & paste information for each step of the funnel:

Step 1: Shopping Basket
/checkout/basket.html

Step 2: Customer Login
/checkout/login.html

Step 3: Customer Information
/checkout/address.html

Step 4: Payment Information
/checkout/payment.html

Here is what the funnel should look like before you save changes:

Google Analytics Funnel Steps

Funnel Steps

Once your screen mimics the image above click Save Changes and you are done! Now reward yourself with a good book, cup of tea, coffee or anything else you find fun.

Closing Notes

Special thanks to Dan at Kemper Strategic for the base code that I modified slightly for this tutorial.

You will need to wait until the next day before you will have data for your new Google Analytics implementation.

The funnel is designed for the standard checkout steps I have seen on the majority of ecommerce sites using Miva Merchant 5.5

The above funnel will NOT work with a one page checkout; you will need to customize to fit your needs

This is not meant to be an end all, be all guide rather it is designed to help merchants get a jump start on tracking the most vital data for successful optimization.

Need Help? Miva Merchant offers Google Analytics implementation via our Monthly Maintenance plan; for more information contact sales at 858.490.2570.

If you enjoyed this post, please consider leaving a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

Social comments and analytics for this post…

This post was mentioned on Twitter by markatmiva: Installing Google Analytics In @Miva_Merchant 5.5 tutorial, http://bit.ly/7PNbc8...

Mark, thanks for this post. I’ve been looking for something like this for a while now.

But, what’s always hung me up before is the Goal URL for the Invoice page since Miva uses session ID’s. Your example Goal URL uses /checkout/invoice.html. My Miva installation doesn’t even have a /checkout directory so I assume you can’t use your example verbatim.

Could you elaborate what the Goal URL needs to be?

Thank you, thank you, thank you!
This tutorial saved me tons of time & anguish. I knew it was possible to get analytical info from my website, but was overwhelmed with where to get started on tracking the ecommerce process.

Guy,

Using the steps above GA will send the page name /checkout/invoice.html instead of the URL with the session ID’s.

The checkout directory has nothing to do with your server; it is only to make it easy to search in the Top Content report for analysis.

The funnel portion of this seems to be working for me, but it is not giving me any product information or other data in the ecommerce section of analytics.

I would like to see adword data with my e-commerce. Knowing what paid words were providing the actual sales would be most helpful.

Thanks, Mark, for making this available.

This is an excellent tutorial! The single script in the global footer handles SO much functionality. Thanks for making this available and I highly recommend using this method.

Concerning step 3, the link whereas it requests download the custom code “here” is not working. It opens a page that is blank – http://blog.mivamerchant.com/wp-content/uploads/2009/11/google-analytics-example.txt
When referring to copy all of this code, is it just the code that begins with “var pagetracker=” that is copied into the global footer?

Hi Sandy,

Try right clicking on the link and choosing “Save as” or “Save link as” to get the file.

You need all the code; however there is only one line you need to edit.

Hope this helps

Nicely done – complete, simple, clean. Thanks!

Just completed all the steps. I’ve already been using GA for my main (non-ecommerce) web site. So now I’m stressing out that the changes to my GA account profile information will effect the pages that are not ecommerce.

We’ll see soon enough, but any thoughts?

Hi Mark,
I followed all the steps you laid out for goal funnels. Everything is working well with one exception. Transactions are correct, Products are doubling, 1=2, 2=4. When I drop the code in the global footer, that’s when it seems to have started. I also currently have google conversion code on the invoice page. I appreciate any help in resolving this issue.

Thank you
Bert

Hi Bert,

Is the “google conversion code” from Google Analytics, Google Adwords or Website Optimizer?

If you have Google analytics code on the invoice page twice that could cause the error which would happen if you have the analytics code in the global footer and the invoice page.

Assuming the “google conversion code” on the invoice page is from Google Analytics I recommend you remove for a couple days to see if the duplicates stop.

You can also use Firebug to monitor the requests being sent (requires some technical know how). http://getfirebug.com/

Hi Mark,
I just wanted let you know it worked, Thank you for all your help. Bert

Hello Mark,
I need your help. Thanks again for the help setting up goal funnels. It’s working great. I need to have both goal funnels and Google adwords conversion tracking code for my store. Within Google analytics conversions are being recorded, but not within adwords. When the conversion code is installed on the thank you page, along with the goal funnel code in the global footer, Items are recorded twice. When I contacted google they mentioned add_item were on completed order page twice. The google conversion code is from Adwords.

I don’t know what needs to modified, Could I send you goal funnel code and conversion tracking code, so you could make necessary changes and I can drop it where it belongs within the store.

Please advise
Thank you for all your help and your patience.
Bert

Hey guys,

I’m trying to figure something out with this. I followed all the steps and things seem to be working for the most part, other than through part of checkout.

Basically, after the user enters their address info, the Miva URL no longer tracks what the screen name is. IE, after the Screen=OCST, it drops the Screen variable from the URL and continues with checkout, so it never reaches the rest of the steps. In fact, the URL never contains Screen=INVC during checkout, so it never triggers the mivascript code to put in the GA order details.

Does anyone know why it’s doing that and a way to change it?

Andy,

The example code provided does not rely on the URL for tracking through checkout to avoid the issue you point out.

Are you using the example code from http://blog.mivamerchant.com/wp-content/uploads/2009/11/google-analytics-example.txt ?

Make sure to change the account number.

In Step 3 the link is not working for the custom code. Can you fix or just email the custom code?

Devon,

I checked the link and it works fine; you can also use the link in the comment right above yours.

Cheers,

Mark

How can I make this track Google Checkout orders? It is working for all orders now except Google Checkout.

Leave a comment

(required)

(required)