Hello,
Google is an everchanging beast and a few years go I made the switch from using the built in Miva Google Analytics module to Using Google Tag Manager.
I have had a few people asking me how it is done so I thought I'd do my best to help guide anyone that needs help.
I will also include setting up what is necessary to track the checkout flow so you can see where users are dropping out of checkout if they do not make a purchase.
DISCLAIMER: This is for any store using the Universal Enhanced Ecommerce (analytics.js) setting in Miva. I cannot confirm that this exact procedure can be used for Universal (analytics.js) or Classic (ga.js).
Use this guide at your own risk and please be sure to check that this can apply to you.
1.) Setting Up Enhanced Ecommerce in Google Analytics (GA)
So for starters you will want to make sure your GA account is set up for enhanced ecommerce.
Log into your GA account and go to All Website Data for the store you are trying to implement this on.
From there go to Admin > All Website Data > Ecommerce Settings
Make sure both the Ecommerce and Enhanced Ecommerce Reporting are enabled.
(The following is optional but highly recommended)
You will also create your Checkout Labeling/Funnel Steps on this screen.
The following checkout funnel labels are based on Miva's native multi-step checkout and would be different if you have a custom checkout flow.
I labeled ours as follows:
1.) Cart Page (BASK in Miva)
2.) Customer Information (OCST in Miva)
3.) Shipping & Payment Selection (OSEL in Miva)
4.) Payment Information (OPAY in Miva)
5.) Order Confirmation (INVC in Miva)
Click Save After both above settings are enabled and checkout flow is set up.
Screenshot for visual reference:
01-GA-Enhanced-Ecommerce-Admin-Ecommerce-Settings.png
2.) Setting Up Google Tag Manager (GTM)
First you need to create a GTM account and then create a container for the website you would like to use this for at https://tagmanager.google.com/
If your having trouble go here: https://support.google.com/tagmanager/answer/6103696 but wait to install the container on your website.
3.) Set Up GA Settings Variable in GTM
Go to your Workspace and then click on "Variables" in the left hand navigation.
Then to the right of "User-Defined Variables" click "New"
Give the variable an easily identifiable Title (by default it is populated with Untitled Variable). I just titled it: Google Analytics Settings
Set your Variable type to "Google Analytics Settings"
Enter your GA Tracking ID (https://support.google.com/tagmanage.../9207621#ga_id)
Set Cookie Domain to auto.
Click "More Settings", then click "Ecommerce".
Check both boxes for "Enable Enhanced Ecommerce Features" and "Use data layer"
Then click "Save"
Screenshot for visual reference:
02-GA-Enhanced-Ecommerce-Settings-Variable.png
4.) Setting Up GA Universal Analytics (UA) Tracking (Pageviews) Tag
In your same Workspace, click on "Tags" in the left hand navigation. Then click "New" on the top right.
Give the Tag an easily identifiable Title (Ex: Google Analytics UA Pageviews).
Set your Tag type to "Google Analytics: Universal Analytics"
Set Track Type to "Page View"
Select the Google Analytics Settings Variable that you set up in the Step 3 in the "Google Analytics Settings" drop down.
Check the box for "Enable overriding settings in this tag"
Set Triggering to "All Pages - Page View"
Click "More Settings", then click "Fields to set", then click "Add Field"
In "Field Name", enter: cookieUpdate (enter exactly as shown). In "Value", enter: samesite=none;secure (enter exactly as shown).
(The following is optional)
Click "Add Field" again.
In "Field Name", enter: allowAdFeatures (enter exactly as shown). In "Value", enter: true (if ad features are enabled in GA) enter: false (if ad features are not enabled in GA).
Then click "Save"
Screenshots for visual reference:
03-GA-Enhanced-Ecommerce-Pageviews.png
04-GA-Enhanced-Ecommerce-Pageviews-More-Settings.png
Google is an everchanging beast and a few years go I made the switch from using the built in Miva Google Analytics module to Using Google Tag Manager.
I have had a few people asking me how it is done so I thought I'd do my best to help guide anyone that needs help.
I will also include setting up what is necessary to track the checkout flow so you can see where users are dropping out of checkout if they do not make a purchase.
DISCLAIMER: This is for any store using the Universal Enhanced Ecommerce (analytics.js) setting in Miva. I cannot confirm that this exact procedure can be used for Universal (analytics.js) or Classic (ga.js).
Use this guide at your own risk and please be sure to check that this can apply to you.
1.) Setting Up Enhanced Ecommerce in Google Analytics (GA)
So for starters you will want to make sure your GA account is set up for enhanced ecommerce.
Log into your GA account and go to All Website Data for the store you are trying to implement this on.
From there go to Admin > All Website Data > Ecommerce Settings
Make sure both the Ecommerce and Enhanced Ecommerce Reporting are enabled.
(The following is optional but highly recommended)
You will also create your Checkout Labeling/Funnel Steps on this screen.
The following checkout funnel labels are based on Miva's native multi-step checkout and would be different if you have a custom checkout flow.
I labeled ours as follows:
1.) Cart Page (BASK in Miva)
2.) Customer Information (OCST in Miva)
3.) Shipping & Payment Selection (OSEL in Miva)
4.) Payment Information (OPAY in Miva)
5.) Order Confirmation (INVC in Miva)
Click Save After both above settings are enabled and checkout flow is set up.
Screenshot for visual reference:
01-GA-Enhanced-Ecommerce-Admin-Ecommerce-Settings.png
2.) Setting Up Google Tag Manager (GTM)
First you need to create a GTM account and then create a container for the website you would like to use this for at https://tagmanager.google.com/
If your having trouble go here: https://support.google.com/tagmanager/answer/6103696 but wait to install the container on your website.
3.) Set Up GA Settings Variable in GTM
Go to your Workspace and then click on "Variables" in the left hand navigation.
Then to the right of "User-Defined Variables" click "New"
Give the variable an easily identifiable Title (by default it is populated with Untitled Variable). I just titled it: Google Analytics Settings
Set your Variable type to "Google Analytics Settings"
Enter your GA Tracking ID (https://support.google.com/tagmanage.../9207621#ga_id)
Set Cookie Domain to auto.
Click "More Settings", then click "Ecommerce".
Check both boxes for "Enable Enhanced Ecommerce Features" and "Use data layer"
Then click "Save"
Screenshot for visual reference:
02-GA-Enhanced-Ecommerce-Settings-Variable.png
4.) Setting Up GA Universal Analytics (UA) Tracking (Pageviews) Tag
In your same Workspace, click on "Tags" in the left hand navigation. Then click "New" on the top right.
Give the Tag an easily identifiable Title (Ex: Google Analytics UA Pageviews).
Set your Tag type to "Google Analytics: Universal Analytics"
Set Track Type to "Page View"
Select the Google Analytics Settings Variable that you set up in the Step 3 in the "Google Analytics Settings" drop down.
Check the box for "Enable overriding settings in this tag"
Set Triggering to "All Pages - Page View"
Click "More Settings", then click "Fields to set", then click "Add Field"
In "Field Name", enter: cookieUpdate (enter exactly as shown). In "Value", enter: samesite=none;secure (enter exactly as shown).
(The following is optional)
Click "Add Field" again.
In "Field Name", enter: allowAdFeatures (enter exactly as shown). In "Value", enter: true (if ad features are enabled in GA) enter: false (if ad features are not enabled in GA).
Then click "Save"
Screenshots for visual reference:
03-GA-Enhanced-Ecommerce-Pageviews.png
04-GA-Enhanced-Ecommerce-Pageviews-More-Settings.png
Comment