Google Tag Manager Setup Checklist for E-commerce Sites
Analytics Strategy
Learn how to set up Google Tag Manager for e-commerce sites in the UK, ensuring accurate tracking and compliance with data privacy regulations.

Google Tag Manager (GTM) can simplify tracking and improve data collection for UK e-commerce businesses. Here's a quick overview of how to set up GTM effectively:
Create a GTM Account: Use your company name, set the country to "United Kingdom", and configure access roles.
Track Key E-commerce Events: Monitor product views, basket actions, checkout steps, and transactions in GBP.
Build a Data Layer: Structure data for transactions, product details, and user interactions.
Set Up GTM Components: Configure data variables, triggers, and GA4 event tags.
Test and Verify: Use preview mode and analytics tools to ensure events fire correctly and data is accurate.
Ensure Compliance: Follow UK GDPR rules by obtaining user consent for tracking.
Maintain Regular Updates: Test weekly, review monthly, and update quarterly to keep your setup functional and compliant.
These steps help you collect accurate data, optimise marketing efforts, and track the entire customer journey smoothly.
GA4 E-Commerce Tracking with Google Tag Manager | GTM ...

Setup Planning
Plan your Google Tag Manager (GTM) setup to ensure accurate tracking, maintain consistent data, and make future updates easier.
Create GTM Account
Set up your GTM account with the right access levels and website properties.
Account Configuration
If managing multiple brands, use your parent company name for the account and create separate containers for each website.
Key settings to configure:
A clear, descriptive account name
Select "United Kingdom" as the country
Use the website URL as the container name
Choose "Web" as the container type
Access Management
Assign roles to users based on their responsibilities:
Administrators: Full access for technical leads
Users with publish rights: Ideal for marketing managers
Users with edit rights: For team members managing daily updates
List Required E-commerce Events
Identify the e-commerce events you need to track to gain insights into the customer journey:
Event Type | Data Points to Track | Purpose |
---|---|---|
Product Views | Product ID, name, price (£), category | Gauge product interest |
Basket Actions | Items added/removed, quantity changes | Understand shopping behaviour |
Checkout Steps | Step number, payment method, shipping | Optimise the conversion funnel |
Transactions | Order ID, revenue (£), tax, shipping | Monitor revenue and transaction details |
Build Data Layer Structure
A well-structured data layer is essential for precise e-commerce tracking.
"Place the dataLayer snippet above the Google Tag Manager container
<script>
if custom data is required for the 'Pageview' event."
Transaction Data
Include details such as:
Order ID, subtotal, and shipping costs
Currency code (GBP)
Payment method
Product Information
Ensure the following data points are included:
Product identifiers
Prices in pounds sterling
Stock availability
Category hierarchy
User Context
Track user-related data like:
Session details
Cart status
Previous purchase history
Use the window.dataLayer.push()
method to capture interactions. For example:
Once your data layer is structured, you can configure GTM components to align with these guidelines.
Data Layer Implementation
Getting the data layer right is essential for tracking e-commerce activities accurately in Google Tag Manager (GTM). It helps measure user interactions and transactions without errors.
Install Data Layer Code
Place the data layer code just before the GTM container snippet:
Key parameters for events like "add to basket" and "purchase" include:
Event Type | Required Parameters | Optional Parameters |
---|---|---|
Add to Basket | item_id, item_name, price, quantity | coupon, item_brand |
Purchase | transaction_id, value, currency, items | shipping, tax, coupon |
"The data layer is an intermediary between your website and Google Tag Manager, functioning as a hub to store structured data for your container." - Stape
After adding the code, you’ll need to verify its functionality and ensure everything is in the correct sequence.
Data Layer Verification
Once installed, check if the data layer is working properly.
Enable Preview Mode
Use preview mode in GTM to ensure events are firing as intended.
Validate Required Parameters
Confirm that all essential fields are present and formatted correctly:
Transaction IDs should be unique.
Currency must be set to 'GBP'.
Prices should include two decimal places (e.g., 24.99).
Product IDs need to match your database entries.
Test Event Sequence
Verify that events occur in the correct order:
view_item_list
select_item
view_item
add_to_cart
begin_checkout
purchase
For a quick inspection of the data layer, use:
"We recommend using dataLayer.push as it is more popular and covers most needs. Additionally, this method is safer to use, as it won't disrupt events in Google Tag Manager, whereas improper setup of data layer declarations can easily cause issues." - Stape
Test different scenarios to ensure everything works:
Buying multiple products
Using various payment methods
Selecting different shipping options
Applying discount codes
Processing product refunds
Finally, monitor real-time analytics to confirm that e-commerce events are being transmitted accurately.
GTM Components Setup
Once your data layer is in place, the next step is to set up the necessary GTM components to collect and send e-commerce data to your analytics platform.
Create Data Variables
Set up data variables to extract key metrics from your data layer.
Variable Name | Data Layer Path | Example Value |
---|---|---|
dlv.currency | ecommerce.currency | GBP |
dlv.transaction_id | ecommerce.transaction_id | ORD-12345 |
dlv.value | ecommerce.value | 249.99 |
dlv.items | ecommerce.items | [{item_id: "SKU123"}] |
dlv.shipping | ecommerce.shipping | 4.99 |
To create these variables in GTM:
Go to "Variable" > "New" > "Data Layer Variable".
Enter the corresponding paths from the table above.
Set Event Triggers
Define triggers to track specific e-commerce actions on your website. Each trigger should align with a key customer interaction.
Here's an example of a data layer push for a "view_item" event:
To create a custom trigger for each event:
Go to "Triggers" > "New".
Select "Custom Event" as the trigger type.
Enter the event name exactly as it appears (e.g., "view_item").
Set it to fire on "All Custom Events".
Once your triggers are ready, link them to GA4 using event tags.
Add GA4 Event Tags
Create GA4 event tags to send e-commerce data to Google Analytics. For example, to set up a purchase event tag:
Go to "Tag" > "New" > "Google Analytics: GA4 Event".
Configure the following settings:
Event Name: purchase
Parameter Name: transaction_id
Value: {{dlv.transaction_id}}
Currency: {{dlv.currency}}
Items: {{dlv.items}}
Use GTM's Preview mode to test each tag. Confirm that events fire in the correct order and that parameters, such as currency ('GBP') and prices (formatted with two decimals), appear correctly. Test different scenarios like bulk purchases, discount codes, varied shipping options, and payment methods to ensure everything works as expected.
Quality Checks
After setting up GTM components, it's essential to verify your configuration through these steps:
Test Tags in Preview Mode
Click on the Preview button in GTM (top-right corner), enter your e-commerce site's URL, and ensure the preview mode badge is visible.
The debug interface provides insights into the following areas:
Tab Name | Purpose | Key Checks |
---|---|---|
Event Timeline | Displays the sequence of Data Layer events | Page views, add-to-cart actions, purchases |
Tags | Shows which tags fired or were blocked | Transaction tracking, product views |
Variables | Displays variable values | Currency (GBP), prices, product IDs |
Data Layer | Reveals pushed data | E-commerce object structure |
Run through key actions like viewing product lists, checking product details, adding items to the basket, proceeding to checkout, and completing purchases.
Pay close attention to details such as:
Currency formatting (GBP)
Price accuracy, including decimal places (e.g., £24.99)
Transaction IDs to ensure they align across all events
Check Analytics Data
Once you've verified the setup in Preview mode, move on to Google Analytics 4 to ensure data accuracy.
In GA4 DebugView, check for:
Correct details in product view events
Accurate quantities in add-to-basket events
Precise revenue values in purchase events
Currency codes appearing as "GBP"
Use the Real-time overview to confirm:
Events are recorded within expected timeframes
Transaction values match those on your e-commerce platform
Product data includes all required parameters
User journey events follow a logical sequence
Be on the lookout for common issues like:
Duplicate transaction records
Missing product information
Gaps in tracking checkout steps
For deeper validation, use tools like your browser's JavaScript console, Tag Assistant Companion, or dataLayer Inspector+. Test a variety of scenarios to ensure robust tracking:
Purchases with multiple items
Transactions with discount codes
Payments through different methods
Various shipping options
Transactions on mobile devices
These checks will help ensure your setup is functioning as expected and capturing accurate data.
Compliance and Maintenance
Once you've confirmed your tags are working correctly and your data is accurate, it's time to focus on compliance and ongoing upkeep.
UK Data Privacy Rules
Your Google Tag Manager (GTM) setup must align with UK data privacy regulations, including the ePrivacy Directive and GDPR. Here’s how to stay compliant:
Delay tag activation until explicit user consent is given.
Offer users clear opt-in and opt-out options for different tracking categories.
Keep records of consent timestamps and user preferences.
Allow users to easily update their consent choices.
"Advertisers using AdWords will be required to obtain consent for the use of cookies where legally required, and for the collection, sharing, and use of personal data for personalized ads for users in the EEA. This includes the use of remarketing tags and conversion tags. Where legally required, advertisers must also clearly identify each party that may collect, receive, or uses end-users' personal data." - Google
Additionally, document your GTM configuration to ensure accountability and streamline future reviews.
Record GTM Setup Details
Keep a detailed record of your GTM setup to make troubleshooting and updates easier. Use the following structure:
Component | Documentation Requirements |
---|---|
Tags | Purpose, trigger conditions, and variables used |
Triggers | Firing rules, exceptions, and debugging notes |
Variables | Data sources, formatting rules, and validation checks |
Data Layer | Event structure, required parameters, and examples |
Also, keep track of:
Container version history with detailed change logs.
Custom HTML tags and their contents.
Data Layer guidelines, including event parameters and values.
User permission settings for access control.
Integration points with third-party tools.
Schedule Regular Updates
Regular maintenance is essential to keep your GTM setup functioning smoothly. Stick to this schedule:
Weekly: Check tag behaviour and ensure consent mechanisms are working properly.
Monthly: Review tag performance and update your documentation.
Quarterly: Remove unused tags, revise privacy policies, review user access permissions, and confirm backup procedures.
Tools like Tag Assistant can help verify your GTM deployment. Maintain a clear audit trail that includes:
Configuration changes
Access updates
Consent management adjustments
Data processing activities
This approach ensures your GTM setup stays compliant, functional, and up to date.
Conclusion
Implementing Google Tag Manager (GTM) for e-commerce sites involves careful planning, thorough testing, and ongoing maintenance. These steps ensure accurate data collection, which is essential for improving marketing performance. A well-organised data layer is key to reliable tracking, helping to connect sales data with user interactions on your website.
To achieve success with GTM, focus on detailed planning, extensive testing, and maintaining compliance. A properly structured data layer and precise setup minimise data issues, ensuring accurate tracking across the entire customer journey - from product views to completed purchases.
FAQs
How can I make sure my Google Tag Manager setup follows UK GDPR requirements?
To ensure your Google Tag Manager (GTM) setup complies with UK GDPR, it’s crucial to prioritise user consent, minimise data collection, and maintain transparency in how data is used.
Start by implementing a consent management platform (CMP) to secure explicit user consent before loading any tags that process personal data. Collect only the information essential for your goals, and wherever possible, anonymise or pseudonymise data to protect individual identities. For enhanced privacy, consider server-side tagging, which allows you to control the flow of data more securely. Finally, conduct regular audits of your GTM setup to confirm ongoing compliance with GDPR regulations.
What are the best practices for managing and updating Google Tag Manager on an e-commerce site?
To effectively manage and update your Google Tag Manager (GTM) setup for an e-commerce site, start by ensuring a well-organised account and container structure with clear ownership and appropriate permissions. This helps maintain control and accountability across your team.
Plan your tag implementation strategy carefully, including tracking key e-commerce events like product views, add-to-cart actions, and transactions. Use a robust Data Layer to capture and manage important data, and ensure your team understands its structure and purpose.
To streamline tracking, assign unique IDs to critical web elements, such as buttons and forms, making them easier to monitor. Additionally, optimise forms to ensure they’re user-friendly and compatible with tracking requirements. Regularly review and test your GTM configuration to ensure accurate data collection and alignment with your business goals.
How can I ensure the data layer is correctly tracking key e-commerce events and user interactions?
To confirm that your data layer is accurately tracking key e-commerce events and user interactions, you can use the preview mode in Google Tag Manager (GTM). This tool allows you to inspect the data being pushed to the data layer in real time, ensuring that critical events such as product impressions, clicks, product detail views, cart updates, checkout steps, and transactions are being captured correctly.
When using preview mode, test various scenarios on your e-commerce site, such as adding a product to the cart or completing a purchase. Verify that the data layer contains the expected information for each event, including product IDs, prices (in GBP), and other relevant details. This ensures your setup is robust and ready for accurate reporting in analytics tools.
Related posts
Google Analytics vs Mixpanel: Which Tool Fits Your Business?
How to Set Up Customer Journey Tracking: Step-by-Step Guide
Digital Analytics Tools: Comparing Top 5 Platforms