A Step-by-Step Guide to Using Google Analytics Enhanced E-Commerce
ShinePages Support
Last Update 2 năm trước
Google Analytics Enhanced E-Commerce gives you the opportunity to get better insights in the shopping behavior of your users by sending product details, sales data, and events directly into your Google Analytics (GA) reports.
In this quick guide, we will show you how to set it up either via the GA's Global Site Tag (gtag.js) or via the Google Tag Manager.
If you've installed Google Analytics via the Global Site Tag, i. e. with the code snippet from your Analytics account:
To start collecting Enhanced E-Commerce data, first enable it in your Google Analytics account.
Go to Settings > Property > Property Settings.
Take note of your tracking ID: UA-XXXXXXXX-X. We'll need it later.
Go to Settings > View > E-Commerce Settings, then enable both E-Commerce and Enhanced E-Commerce. Save your settings.
Setting-up via the Global Site Tag
Setting-up via the Global Site Tag
If you've installed Google Analytics via the Global Site Tag, i. e. with the code snippet from your Analytics account:
<!-- Global site tag (gtag.js) - Google Analytics -->
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-XXXXXXXX-X');
</script>
Then you are done! E-Commerce data will now be automatically reported with your orders.
Setting up via the Google Tag Manager
If you are using the Google Tag Manager, there is a little more required:
Open your Google Tag Manager and go to Variables.
Define a variable for your Google Analytics Tracking ID:
For Variable Type, select Google Analytics Settings and enter your tracking ID.
Under Tags, create a new tag.
Click on Triggering, and add a new trigger.
For the trigger type, select Custom Event, and for the Event Name, enter "e-commerce" (lowercase).
Going back on the New Tag screen, click on Tag Configuration, and choose Google Analytics: Universal Analytics.
For Track Type, choose Event, then enter a category name (E-Commerce, for example).
Select your Google Analytics variable under the Google Analytics settings.
Next, check the Enable overriding settings in this tag checkbox, then under More Settings, expand E-Commerce. Select TRUE for Enable Enhanced E-Commerce Features, and check the Use Data Layer checkbox.
Your Tag should now look like this:
Save it, then submit your workspace.
That's it! E-Commerce data should start reporting to your Google Analytics account.
You can keep track of it in GA under Conversions > E-Commerce.
With the Enhanced E-Commerce integration, the following events will be included in your Google Analytics report:
1. Adding a product to a cart
2. Removing a product from the cart
3. Initiating checkout
4. Entering payment details
5. New Order/Purchase