Pankaj Shah web agency director in London with over 20 years of experience in web design and project management

I hope you enjoy reading our blog posts.

If you want DCP to build you an awesome website, click here.

How to Set Up Google Analytics for WooCommerce

This guide provides comprehensive, step-by-step instructions for integrating Google Analytics with your WooCommerce store, with a focus on the needs of UK businesses. You will learn how to meet all prerequisites, choose from the main installation methods, and configure your setup for precise eCommerce tracking. Advanced options like Google Tag Manager and popular plugins are also covered. By following along, you will unlock critical insights into how customers interact with your WooCommerce site and make confident, data-driven decisions to improve your business performance.

Whether you are starting from scratch or want to upgrade your current analytics, this guide covers essential best practices unique to online shops. By the end, you will have the tools and practical know-how to measure your store’s success and drive business growth.

How to Set Up Google Analytics for WooCommerce

Before You Begin: What You Need to Get Started

Before you dive into the setup, you need a few essentials. First, make sure you have an active Google account, as this is required for Google Analytics. You will also need full administrative access to both your WordPress and WooCommerce website so you can install plugins or edit code as needed.

Next, check for any existing analytics setup, such  Google Analytics 4 (GA4). Keep handy any current tracking codes you might have added in the past. Being prepared with these details will help you avoid common problems and make the integration process as smooth as possible.

Choosing an Installation Method for Google Analytics

You have several options for adding Google Analytics to your WooCommerce website. The most common methods are using a WordPress plugin, manually adding the tracking code, or using Google Tag Manager. Each approach offers its own balance of ease, control, and flexibility.

Which method you choose depends on your technical comfort level and the specific features you need, like enhanced eCommerce tracking or GDPR compliance. Plugins offer quick setup, while manual integration gives you more direct control, and Google Tag Manager is ideal for advanced custom tracking.

Google Analytics Plugin Installation Steps

  1. Select a reliable plugin: Popular options include MonsterInsightsGoogle Site Kit, and WooCommerce Google Analytics Integration. Look for plugins that support Google Analytics 4 (GA4) and enhanced eCommerce tracking. Check user ratings and compatibility with your WordPress version.
  2. Install the chosen plugin: In your WordPress dashboard, head to Plugins and click Add New. Search for your plugin by name. Click Install and then Activate once the plugin has been downloaded.
  3. Configure the plugin: After activation, locate the plugin’s settings. For MonsterInsights, for example, you will find this under Insights in your left menu. Use the setup wizard or manual input to connect your Google Analytics account. Typically, you will sign in to your Google account and allow the plugin to access your Analytics property.
  4. Add your GA4 Measurement ID: Most plugins will prompt you for your GA4 Measurement ID (looks like G-XXXXXXXXXX). Paste this into the relevant field.
  5. Enable enhanced eCommerce features: Many plugins include options to activate enhanced eCommerce tracking specifically for WooCommerce. Look for checkboxes or toggles labelled Enable Enhanced eCommerce or similar.
  6. Save and test your setup: Save your settings. Use Google Analytics Realtime reports to confirm your site is sending data. Complete a test purchase to confirm eCommerce events are tracked.

Using a plugin means you avoid manual code edits, benefit from ongoing plugin support, and ensure analytics keeps working with site updates.

Manual Google Analytics Code Installation

  1. Get your GA4 measurement code: Sign in to Google Analytics, go to your GA4 property, then click Admin and find the Data Streams. Select your web stream and copy the provided Global Site Tag (gtag.js) code snippet.
  2. Add the code to your theme: Via your WordPress dashboard, go to Appearance > Theme Editor (or use FTP/SFTP for better safety). Find the header.php file in your active theme or, preferably, create a child theme to avoid overwriting changes with updates. Paste the gtag.js code just before the </head> tag.
  3. Save and upload: Save the edited file and upload it if using FTP/SFTP. Visit your site in a new tab and inspect the page to confirm the tracking code appears in the header.
  4. Test your integration: Use the Realtime section in your GA4 property to check for active users. For precise WooCommerce tracking, you may need to add extra event snippets for actions like add_to_cart or purchase using custom JavaScript (placed in footer.php, a child theme, or a dedicated plugin).
  5. Best practice: Avoid code clashes and future-proofing: Always back up your site before editing files. For regular stores, avoid editing a parent theme directly as updates will override your changes. Using a child theme helps preserve your analytics integration.

This manual method suits tech-savvy users or developers wanting full control. It is lighter on resources and removes the need for extra plugins while supporting custom WooCommerce event tracking with JavaScript.

Configure WooCommerce Backend for Analytics Integration

To get the most accurate data from your WooCommerce store, you need to ensure the backend is correctly set up for analytics. This generally means verifying that Google Analytics is properly connected and that enhanced eCommerce tracking is enabled. When done right, you will capture the full customer journey and valuable sales metrics straight from your WooCommerce reports.

In the next sections, you will find step-by-step instructions on linking Analytics to WooCommerce and unlocking advanced eCommerce features, so you can make the most out of your business data.

Enable Enhanced Ecommerce Tracking in WooCommerce

  1. Open your Analytics settings: If you’re using a plugin like MonsterInsights or WooCommerce Google Analytics Integration, find its settings under your WordPress dashboard. Look for a section dedicated to eCommerce or enhanced eCommerce.
  2. Activate enhanced tracking: Tick the option labelled Enable Enhanced eCommerce or similar. This setting allows data on product views, cart additions, and completed checkouts to be sent to Google Analytics automatically.
  3. Verify in Google Analytics: Within your GA4 property, go to Admin > Data Streams and ensure Enhanced Measurement is enabled for your web data stream. This feature streamlines the tracking of many eCommerce actions.
  4. Add custom events for WooCommerce (if needed): Some plugins don’t support all eCommerce events out of the box. For full tracking of actions like add_to_cart, begin_checkout, and purchase, you may need to add custom JavaScript events using gtag(‘event’, …). Place this in your theme or using a custom plugin for accuracy.
  5. Test your integration: Place a test order. Review your GA4 Events and Conversions reports to make sure eCommerce data appears as expected, such as product impressions, add-to-cart actions, and purchases.
  6. Explore advanced reporting: By enabling enhanced eCommerce in both WooCommerce and GA4, you will unlock advanced analytics like product performance, shopping behaviour, and checkout funnel analysis, providing deep insights into how customers interact with your store.

This process ensures that each key user action, from the initial product view to completing a purchase, is properly tracked for your analysis and business decisions.

Ecommerce Tracking WooCommerce: Key Data Points to Monitor

  • Revenue: Tracks your total sales and lets you monitor income growth over time.
  • Conversion rate: Measures the percentage of visitors who make a purchase, helping you assess your store’s effectiveness.
  • Average order value: Indicates how much customers typically spend per order, useful for strategising promotions.
  • Unique transactions: Shows the number of individual orders, allowing you to understand purchasing patterns.
  • Product performance: Provides insights into which items are your top sellers or need attention.

Keeping a close eye on these metrics helps you measure marketing success and identify opportunities for store improvement.

Setting Up Google Tag Manager for WooCommerce Tracking

Google Tag Manager (GTM) offers WooCommerce store owners an advanced but flexible way to manage analytics and tracking scripts. Instead of manually editing code or juggling multiple plugins, GTM lets you organise all your tracking in one central dashboard. This is especially valuable if you want granular control over what data is sent and when.

The following section will guide you through setting up GTM, creating custom tags, and using triggers for specific eCommerce events, helping you get the most out of your analytics setup in WooCommerce.

Configure Google Manager with Custom Tracking Features

  1. Create a GTM account and container: Visit the Google Tag Manager website, sign in with your Google account, and set up a new account and container for your WooCommerce website. This container will hold all your tracking tags.
  2. Add the GTM container to your website: Copy the GTM code snippets provided and paste them into your theme’s header.php and body tags, preferably via a child theme or a plugin for header/footer scripts.
  3. Configure data layer for WooCommerce events: For accurate eCommerce tracking, push key WooCommerce events like add_to_cart, begin_checkout, and purchase into the data layer using custom functions. This enables GTM to capture all important actions.
  4. Set up Analytics tags: In GTM, create a new tag for Google Analytics 4. Link it to your Measurement ID. Assign the trigger to fire on all pages or for specific eCommerce events from your data layer configuration.
  5. Customise tracking with variables and triggers: Create custom variables (like product ID, value, or category) and advanced triggers to monitor granular actions, such as button clicks, form submissions, or even subscription renewals.
  6. Test before publishing: Use GTM’s Preview mode to test that your tags and triggers fire correctly. Monitor Google Analytics Realtime to verify that eCommerce events are being received.
  7. Publish your GTM container: Once confirmed, publish the container so tracking goes live, ensuring ongoing data collection for your WooCommerce store.

By leveraging GTM, you gain extraordinary flexibility to adapt your tracking as your WooCommerce shop evolves, without repeatedly editing code.

Install MonsterInsights and Activate Seamless WooCommerce Analytics

MonsterInsights is a top-rated plugin that makes Google Analytics integration effortless, even for non-technical users. For WooCommerce store owners, it offers a straightforward setup, automated tracking, and extra eCommerce features at your fingertips.

In the following sections, we will walk you through installing MonsterInsights, linking it to your Google Analytics account, and enhancing your WooCommerce analytics with powerful addons for even deeper insights.

Installing and Activating the MonsterInsights Plugin

  1. Install MonsterInsights: Log into your WordPress admin dashboard, head to Plugins, and click Add New. Type “MonsterInsights” in the search bar. Click Install Now then Activate.
  2. Launch the Setup Wizard: After activation, MonsterInsights will prompt you to run its Setup Wizard. Click to begin, and pick the “eCommerce” website type for WooCommerce integration.
  3. Connect to Google Analytics: Follow the wizard’s prompts to log in to your Google account and select the correct GA4 property or Measurement ID. Authorise MonsterInsights to access your Analytics data.
  4. Enable eCommerce tracking: The wizard includes an automated step to activate eCommerce tracking features for your WooCommerce store. You can review or adjust these under the eCommerce tab later in the MonsterInsights settings.
  5. Verify integration: Open Google Analytics and visit the Realtime and Events reports. MonsterInsights will automatically send eCommerce data such as purchases, cart actions, and more from WooCommerce.
  6. Set up notifications (optional): MonsterInsights can send email summaries of your store’s performance directly to your inbox, so you stay on top of your data without logging in every day.

With MonsterInsights, all the necessary code and advanced tracking options are managed behind the scenes, saving you valuable time with reliable results.

Extend WooCommerce Analytics with MonsterInsights Addons

  • eCommerce Addon: Unlocks enhanced reporting for WooCommerce sales, conversion rate tracking, and top product identification.
  • User Journey Addon (Pro): Visualise the steps customers take before purchasing, helping you refine your sales funnel.
  • Custom Dimensions Addon: Lets you track extra data points like customer type, product categories, or logged-in status for deeper insights.
  • Advanced Tracking Addon: Enables support for tracking coupons, refunds, and other key WooCommerce features.

These addons make it easy to tailor analytics to your business needs and uncover hidden opportunities for growth.

Troubleshooting WooCommerce Analytics Tracking Problems

No matter how well you set up Google Analytics on WooCommerce, tracking hiccups can still appear. Common problems include missing revenue data, inaccurate conversion counts, and conflicts with other WordPress plugins.

This section highlights the most frequent issues affecting analytics accuracy and introduces practical solutions to keep your reports reliable. You will find actionable steps in the next few sections for addressing each key problem area, restoring full tracking confidence for your business.

Fixing Missing Revenue Data and Duplicate Transactions

  1. Check tracking code placement: Make sure your GA4  tag is only installed once in your site header. Multiple or misplaced code snippets can cause missing or duplicated data.
  2. Review event configuration: If using manual or plugin-based event tracking, confirm that purchase events are only triggered once per completed transaction. Check for errors in JavaScript or trigger misfires in Tag Manager.
  3. Reconcile testing and live data: Exclude your own IP address or admin user role from tracking, as repeated test purchases may inflate figures or cause duplicates.
  4. Sync plugin updates: Outdated analytics or WooCommerce plugins may not support recent changes in GA4 event formatting. Keep all software updated to minimise bugs.

Following these checks helps restore consistent, accurate reporting of your store’s revenue and sales activity.

Resolving Plugin Conflicts and Cookie Consent Issues

  1. Check for caching plugin conflicts: Caching or optimisation plugins may prevent tracking code from firing as intended. Configure your cache plugin to exclude pages like the basket and checkout, or manually clear the cache after making analytics changes.
  2. Review GDPR and cookie consent settings: In the UK, analytics cookies must be set only after the user consents. Use a consent management plugin compatible with Google Analytics that integrates with your chosen analytics method.
  3. Prevent consent overwrites: Some GDPR extensions or platforms may overwrite analytics consent scripts. Carefully test your banner to ensure Google Analytics does not load before user consent is obtained.
  4. Troubleshoot plugin compatibility: Occasionally, multiple plugins try to load different analytics snippets, leading to data inconsistencies. Stick with one analytics plugin or manually remove old tracking code to prevent overlap.
  5. Verify analytics tracking cookies: Use your browser’s developer tools or a cookie scanner to ensure cookies such as _ga are being set only with proper consent. If not, adjust plugin or Tag Manager settings as required.
  6. Maintain legal and ethical standards: For UK and EU store owners, always keep privacy compliance up to date by monitoring government advice on analytics and eCommerce data handling.

Proactively addressing these areas helps you maintain both data quality and trust with your customers, aligning with current privacy regulations.

Frequently Asked Questions About WooCommerce Analytics Setup

It typically takes a few minutes for basic data to appear in Realtime reports, but full eCommerce data may take up to 24 hours to display in all analytics sections.
As of July 2023, Google only supports GA4 as the standard for new properties. If you still have a Universal Analytics tag, migrate to GA4 for future compatibility and improved eCommerce reports.
Double-check your plugin or code placement, especially after theme or plugin updates. Clear caches, ensure all settings are enabled, and look for JavaScript errors in the console.
Yes, you can add GA4 code manually to your theme’s header file, but plugins simplify the process, especially for automatic event tracking.
In the UK and EU, you must use a GDPR-compliant cookie consent solution before setting analytics cookies. This keeps you on the right side of privacy laws.
These FAQs help clear up the most common concerns for UK WooCommerce site owners looking to track and improve their eCommerce success with Google Analytics.

Conclusion: Measuring WooCommerce Performance for Business Growth

Setting up Google Analytics on your WooCommerce store is one of the most reliable ways to grow your business with data-driven decisions. According to Google, UK companies using analytics are twice as likely to report above-average profits, highlighting the value of tracking real metrics.

Google Analytics gives you the data you need to understand how customers interact with your WooCommerce store, from the products they view to the purchases they complete. By tracking ecommerce performance accurately, you can identify opportunities to improve conversions, refine your marketing campaigns and make informed business decisions based on real customer behaviour.

If you’re looking for expert WooCommerce Web Design London services, DCP Web Designers build high-performing ecommerce websites with Google Analytics, conversion tracking and SEO integrated from the start. Whether you’re launching a new online store or improving an existing one, our experienced team can help you create a WooCommerce website that delivers measurable business growth.

Author

Picture of Pankaj Shah

Pankaj Shah

Pankaj Shah is the founder of DCP Web Designers, an award-winning London-based web design and digital marketing agency. With over 20 years of experience, he specialises in WordPress web design, WooCommerce, SEO and helping businesses build effective online solutions.
Tell Us Your Thoughts

This website (dcpweb.co.uk) uses cookies to improve your browsing experience and help us understand how our site is used. By continuing to browse this website, you agree to our use of cookies.

To learn more about how we collect, use, and protect your data, please read our Privacy Policy.

Since 2004, we have designed and developed websites for companies across a wide range of industries, from local service businesses to ecommerce brands and professional organisations.

Our focus is on creating websites that not only look professional, but also perform well in search engines, attract the right audience and support long-term business growth.

If you are looking for experienced web designers who understand how to build websites that deliver real results, our team is here to help.

Privacy Policy

Last Updated: 01/07/2024

Different Colour Productions Ltd (“we,” “us,” or “our”) is committed to protecting your privacy. This Privacy Policy outlines our practices concerning the collection, use, and disclosure of personal information when you visit our website or engage with our services. By using our website and services, you consent to the terms outlined in this Privacy Policy.

1. Information We Collect

We collect various types of information to provide and improve our services. The types of information we may collect include:

1.1. Personal Information: This may include your name, email address, phone number, and any other information you provide when you contact us, request information, or subscribe to our newsletter.

1.2. Log Data: When you visit our website, we automatically collect information, such as your IP address, browser type, pages visited, and the time and date of your visit.

1.3. Cookies and Similar Technologies: We use cookies and other tracking technologies to improve your experience on our website. You can adjust your browser settings to reject cookies or be alerted when cookies are being used.

2. How We Use Your Information

We use the collected information for various purposes, including:

2.1. Providing Services: To provide web design and related services you have requested from us.

2.2. Communication: To respond to your inquiries, send updates, and provide customer support.

2.3. Analytics: To analyse and improve our website and services, as well as monitor usage patterns.

3. Information Sharing and Disclosure

We do not sell or rent your personal information to third parties. However, we may share your information with third parties under the following circumstances:

3.1. Service Providers: We may share your information with trusted service providers who help us deliver our services, such as hosting providers, analytics providers, and marketing services.

3.2. Legal Obligations: We may disclose your information when required by law, to comply with legal processes, or to protect our rights, privacy, safety, or property.

4. Your Choices

You have choices regarding your personal information:

4.1. Access and Update: You can access and update your personal information by contacting us.

4.2. Marketing Communications: You can opt out of receiving marketing communications from us by following the unsubscribe instructions in our emails or emailing [email protected]

5. Security

We take appropriate measures to protect your personal information from unauthorised access, disclosure, alteration, or destruction.

6. Links to Other Websites

Our website may contain links to third-party websites. We are not responsible for the privacy practices of these websites. We recommend reviewing their respective privacy policies.

7. Changes to this Privacy Policy

We may update this Privacy Policy from time to time to reflect changes in our practices. Any changes will be posted on this page, and the date at the top will indicate the latest update.

8. Contact Us

If you have any questions or concerns about this Privacy Policy or our practices, please contact us at: [email protected]

By using our website and services, you acknowledge that you have read and agree to this Privacy Policy. Different Colour Productions Ltd is committed to safeguarding your personal information and respecting your privacy rights.

ThreeBestRated Top 3 Website Designers in London 2026 award for DCP Web Designers Certificate