Every coin has two sides. Shopify provides store owners ready-to-use templates and eCommerce friendly URL structures that hugely save eCommerce website creation and increase marketing, operation efficiency.
Due to this fixed framework and structure, Shopify can’t facilitate owners to understand granular marketing performance for each SKU transaction data. Owners can’t learn web content insight that can engage and better convert traffic into sales. All these are critical to optimize SKU conversion rate and see if the SKU should be continued based on the profit performance.
Shopify hosts the webserver and manages the checkout path URL setting. If you are using the Basic Shopify, Shopify, or Advanced Shopify plans, the web checkout path modification is not available to you to edit or change. It is not straightforward to add a pixel, compared with WooCommerce. Shopify Plus customers only can view and modify checkout. liquid path, and customize the tracking for specific data collection.
. In this article, I’m going to instruct you on how to install Google analytic eCommerce tracking correctly. By the end of this article, you can pick up the methods to set up Shopify Google Analytics. The website can collect transaction data and customized data. And you can learn e-commerce website-specific content and event engagement and sales performance in a centralized view.
- Create a Universal Analytics Account and Why
- Enable eCommerce Enhancement and Custom the Data Collection
- Set up Conversion Funnel and Goals
- Content Grouping
- Omni Media Channel UTM Taggings
- FAQ
Before walking through the Google analytics setup details, here are fundamental and advanced Google Analytics couresa courses I think it is very helpful and useful.
1. Create a Google Analytics Account and Set up a Universal Analytic Property
The event-based and event-driven Google Analytics 4 beta version has launched, and I believe Google might suggest you use this tracking tool that combines web and App tracking and facilitates you to see a full centralized picture in one dashboard.
I would recommend you separate the web and app tracking at the moment. First, the reason is that it’s a beta version, many features are not in place yet. And the current operation interface is too simple to find and set up the tracking for your business. Secondly, Shopify hasn’t integrated with the Google analytics 4 beta version yet. What you can do mostly is by leveraging third-party plugins to collect the transaction data.
Below are the steps to create Google Universal analytics and add the tracking js. to Shopify:
- Sign-up using your main Google account.
- Log in and click the admin at the top and go to “Tracking Info” > “Tracking Code”: Copy your code that will look something like the below, but with your unique UA ID.
- Paste to Shopify Google Analytic Box
2. Enable eCommerce Enhancement Tracking
The enhanced eCommerce plug-in for analytics.js enables the measurement of user interactions with products on eCommerce websites across the user’s shopping experience, including product impressions, product clicks, viewing product details, adding a product to a shopping cart, initiating the checkout process, transactions, and refund.
Steps:
- First of all, you go to “Online Store” > “Preferences” in Shopify. Secondly, you click the checkbox for the use of enhanced eCommerce and click save.
- You log in to the Google Analytics account and click the admin and the eCommerce settings.
- You enable eCommerce and Enhanced Ecommerce Reporting.
Shopify automatically hooks the analytics code in your theme as they have a full pre-built enhanced eCommerce analytics integration. You can check the eCommerce report in analytics 24 hours after your first sale is generated
This is just halfway done if you aim to view more transaction data and integrate it with your SKU profit calculator in a dashboard because you need to exclude the tax and shipping cost out of the revenue column in GA at the moment.
Step 1: List data fields in Google Analytics
Add Transaction List:
- id
- affiliation
- revenue
- coupon
- tax
- shipping
- currency
Add Item List:
- id
- SKU
- name
- list_name
- brand
- category
- variant
- list_position
- quantity
- currency code
- price
Step 2: Collect variable data
Add Transaction
“id”: {{order_name|handleize}}, // Transaction ID. Required.
“affiliation”: ‘store name’, // Affiliation or store name.
“revenue”: {{order.subtotal_price|money_without_currency}},
“coupon”: “{{ line_item.quantity . }}”,
“tax”: “{{ order.tax_price|money_without_currency }}”,
“shipping”: “{{ order.shipping_price|money_without_currency }}”,
“currency”: “{{shop.currency }}”
Add Item
“id”: {{order_name|handleize}}, // Transaction ID. Required.
“sku”: “{{ line_item.sku }}”,
“name”: “{{line_item.title}}”,
“list_name”: “Search Results”,
“brand”: “Brand Name”,
“category”: “{{ line_item.product.collections[0].title }}”,
“variant”: “{{line_item.variant}}”,
“list_position”:. “1”,
“quantity”: “{{ line_item.quantity }}”,
“currencyCode”: “{{shop.currency }}”,
“price”: “{{ line_item.line_price | money_without_currency}}”
In the Revenue field “revenue”
{{order.subtotal_price|money_without_currency}}” we added the subtotal of the transaction (Excluded Tax and Shipment/Delivery charges).
You can make changes in the below script according to your requirements. Then you add this script into the Shopify Settings, Checkout, and Additional Scripts section. Make sure to uncheck the “Enhanced Ecommerce Reporting” option in Shopify.
(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','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-xxxxxxx-x', 'auto');
ga('require', 'ecommerce');
ga('ecommerce:addTransaction', {
"id": {{order_name|handleize}}, // Transaction ID. Required.
"affiliation": 'store name', // Affiliation or store name.
"revenue": {{order.subtotal_price|money_without_currency}},
"coupon": "{{ line_item.quantity }}",
"tax": "{{ order.tax_price|money_without_currency }}",
"shipping": "{{ order.shipping_price|money_without_currency }}",
"currency": "{{shop.currency }}"
});
{% for line_item in line_items %}
{% assign list_position = forloop.index + 1 %}
{% assign product_category = '' %}
ga('ecommerce:addItem', {
"id": {{order_name|handleize}}, // Transaction ID. Required.
"sku": "{{ line_item.sku }}”,
"name": "{{line_item.title}}”,
"list_name": "Search Results”,
"brand": "Brand Name”,
"category": "{{ line_item.product.collections[0].title }}”,
"variant": "{{line_item.variant}}”,
"list_position": "1”,
"quantity": "{{ line_item.quantity }}”,
"currencyCode": "{{shop.currency }}\
,