Woocommerce Google Analytics



WooCommerce Google Analytics by WooCommerce – The best all round free option My first recommendation is the most basic WooCommerce plugin direct from the WooCommerce team itself. While this plugin has never had an amazing rating (currently 3/5 with over 90,000 active installations at the time of writing) I’ve always found it to be the most. WooCommerce Google Analytics Pro adds advanced event tracking to your WooCommerce store and automatically pushes these events into Google Analytics, letting you easily get insights into important metrics like average order value, conversion rate, sales by product or category, and other valuable data. ECommerce Tracking with almost no setup! Google Analytics is a free web analytics tool that tracks visitors and pageviews on your site. WooCommerce Google Analytics Pro integrates with your Google Analytics account to track eCommerce events in your store, including advanced event tracking such as purchases, product reviews, coupon usage, full order refunds, and more.

  1. Google Tag Manager
  2. Woocommerce Google Analytics
  3. Woocommerce Google Analytics Pro
  4. Woocommerce Google Analytics Not Working

Overview ↑ Back to top

  1. Description This plugin provides the integration between Google Analytics and the WooCommerce plugin. You can link a referral to a purchase and add transaction information to your Google Analytics data. It also supports Global Site Tag, Universal Analytics, eCommerce, and enhanced eCommerce event tracking.
  2. WooCommerce Google Analytics Pro by WooCommerce – The best paid option The free version of the WooCommerce supported plugin is certainly sufficient to get you up and running quickly for free if you’re on a tight budget. But if you can justify a small investment in the pro version I would highly recommend it.

Google Analytics is a free web analytics tool that tracks visitors and pageviews on your site. WooCommerce Google Analytics Pro integrates with your Google Analytics account to track eCommerce events in your store, including advanced event tracking such as purchases, product reviews, coupon usage, full order refunds, and more.

Uses enhanced eCommerce tracking to provide valuable metrics on your store’s performance.

Not sure if you need the free plugin or this Pro version? Check out our comparison here.

Installation ↑ Back to top

  1. Download the extension from your WooCommerce dashboard
  2. Go to Plugins > Add New > Upload and select the ZIP file you just downloaded
  3. Click Install Now, and then Activate
  4. Click the Configure link and read the next section to learn how to setup and configure the plugin.

Setup and Configuration ↑ Back to top

Configure the plugin by going to WooCommerce > Settings > Integrations. You will see ‘Google Analytics Pro’ listed as an option. Click this to see the settings.

Extension Settings ↑ Back to top

  • Enable GA Tracking – Enable / check this to enable Google Analytics tracking. Disable this to disable tracking completely.
  • Google Analytics Property – Click to authenticate the plugin with the Google Analytics Property for your site.
  • Google Analytics Tracking ID – (If manually entering a tracking ID — not recommended) Input your Google Analytics property’s tracking ID to track events under the correct property.
  • Track Administrators? – Enable this to track actions by administrators and shop administrators. Leave disabled to exclude events from these users.
  • Tracking Options – Determine if you want to enable Display Advertising, Use Enhanced Link Attribution, Anonymize IP address (may be required by your country), and / or Track User IDs. We recommend anonymizing IP addresses and tracking user IDs, as tracking user IDs counts logged in users as one user (even across multiple devices), making your user count more accurate. Please note that if you intend to track User IDs, there are some additional steps reuired to enable User ID in your Google Analytics property. These steps are outlined in a Google Analytics help document here.
  • Enable Google Optimize – Click to integrate Google Optimize with Google Analytics.
  • Track Product impressions on – Determine when product impressions should be tracked: on single product pages, and / or archive pages (ie the shop). If you encounter “No HTTP response detected” errors, chances are you’re tracking more impressions than Google Analytics allows; please remove “Archive pages” from this setting if so.
  • Logging – Log nothing (default), or turn on to add debugging information to the PHP error log. Be careful when enabling this on a busy site, as it can quickly flood the PHP error log. For best performance, leave logging disabled unless you experience issues with the plugin.

Customize Event Names ↑ Back to top

Google Tag Manager

Every event name sent to Google Analytics can be changed by editing the text field associated with each event. This is useful if you have an existing implementation and want to keep your event names consistent.

Woocommerce Google Analytics

To disable tracking of a particular event, clear the text field associated the event.

  • Signed In – Triggered when a customer signs in. The sign in can occur anywhere (wp-login.php, my account page, sign in widget, etc) and it will be tracked. Users are identified as soon as they login and are tracked as that identity until they logout (if you enable user ID tracking).
  • Signed Out – Triggered when a customer signs out. Identities are cleared upon logout, so if multiple people use the same computers but use different logins, this will help to track them all accurately.
  • Viewed Signup – Triggered when a visitor views the sign up (my account / registration) page. Hooks into the WordPress register form and will track anywhere it is used.
  • Signed Up – Triggered when a visitor registers an account. Hooks into the WordPress registration system and will track registrations anywhere the WordPress register form is used.
  • Viewed Homepage – Triggered when a visitor views the homepage.
  • Viewed Product – Triggered when a visitor views a single product. The ‘Product Name’ is tracked as an event label.
  • Clicked Product – Triggered when a visitor clicks on a product in a listing, such as the shop or search results. The ‘Product Name’ is tracked as an event label.
  • Added to Cart – Triggered when a visitor adds an item to their cart, either on a single product page or via an AJAX link on category pages. Hooks into the ‘woocommerce_add_to_cart’ action, so custom add-to cart-links should track as well. Labels: Product Name, Quantity, Category, and Attributes (if product is a variation).
  • Removed from Cart – Triggered when a visitor removes an item from their cart. Labels: Product Name.
  • Changed Cart Quantity – Triggered when a visitor increases or decreases the number of units in their cart. This event can be recorded very frequently if visitors to your site tend to have a large number of unique items in their cart. In this case, you can safely disable this event. Labels: Product Name, Quantity.
  • Viewed Cart – Triggered when a visitor views the cart. This will also track when the cart is empty.
  • Applied Coupon – Triggered when a visitor applies a coupon on either the cart or checkout. Labels: Coupon Code.
  • Removed Coupon – Triggered when a visitor removes a coupon on either the cart or checkout. Labels: Coupon Code.
  • Started Checkout – Triggered when a visitor starts the checkout process.
  • Provided Billing Email – Triggered when a visitor provides a billing email on the checkout page.
  • Selected Payment Method – Triggered when a visitor chooses a payment method at checkout.
  • Started Payment – Triggered when a customer starts the payment process. This will only track if you are a using a payment gateway that uses a “Pay” page, such as Chase Paymentech or Authorize.Net SIM.
  • Completed Purchase – Triggered when a customer’s purchase has been submitted or paid for. This will track for gateways that immediate complete payment, such as credit cards, or those that place the order for a later payment, such as a “Check Payment” order. Labels: Order ID, Order Total, Shipping Total, Total Quantity, Payment Method.
  • Wrote Review – Triggered when a visitor writes a review of a product. This is tracked before spam processing, so if you get a lot of spam, you can consider disabling this event. Labels: Product Name.
  • Commented – Triggered when a visitor writes a comment on a blog post. This is tracked before spam processing, so if you get a lot of spam, you can consider disabling this event. Labels: Post Title.
  • Viewed Account – Triggered when a customer views the ‘My Account’ page.
  • Viewed Order – Triggered when a customer views an order.
  • Updated Address – Triggered when a customer updates their billing or shipping address.
  • Changed Password – Triggered when a customer changes their password.
  • Estimated Shipping – Triggered when a visitor estimates shipping from the cart page. Labels: Country.
  • Tracked Order – Triggered when a customer submits the ‘Order Tracking’ form.
  • Cancelled Order – Triggered when a customer cancels a pending order.
  • Order Refunded – Triggered when an order has been fully refunded.
  • Reordered – Triggered when a customer reorders a previous order.

(Click to view larger images)


Checkout Funnel Settings ↑ Back to top

The Checkout Behavior Analysis will automatically be populated, so long as at least 1 event in the funnel is being tracked for your site. These events or the order cannot be configured, as they need to be static steps sent to Google for every checkout. You can track all 4 events to gain insight into how much of the checkout process customers complete, or delete an event name to stop tracking it.

These steps can be re-named in your Google Analytics account if desired by going to Admin > eCommerce settings:

You can then add custom names for the steps you have enabled on your site. Note that this does not influence what events are tracked. The tracked events are static, but you can choose any name you want for steps 1 – 4 (or less if you have disabled some events).

To learn more about what the Checkout Behavior Analytics tracks, please read more about tracked funnels.

Authenticating with GA ↑ Back to top

There are two ways to connect the plugin to your Google Analytics account: by authenticating or by manually entering your tracking ID. We strongly recommend authenticating rather than manual entering. This is more reliable and will ensure that any future feature additions will be supported without further action from you.

Authenticating

To authenticate the plugin with your Google Analytics account, click the “Authenticate” button in the plugin settings. This will begin the authentication process.

  1. Google will ask you to allow the plugin the permissions listed. Click “Allow”.
  2. This will populate the profile dropdown with your Google Analytics properties.
  3. Select the correct property from the list and save your settings.

Manual Entry

To manually enter your Tracking ID, log into your Google Analytics account.

  1. Go to “Admin” at the top and select “Property Settings” for the correct property.
  2. Under the property settings, copy the Tracking ID listed.
  3. Paste this Tracking ID into the plugin settings.

Your GA Account ↑ Back to top

Once you’ve connected your Google Analytics account and set up event names, you can save the plugin settings, and eCommerce tracking data will begin to show up in your Google Analytics account within 24 hours. You can read more about enhanced eCommerce tracking here.

Once you’ve saved the plugin events settings, the plugin will add all of the events you’ve configured as events in your GA dashboard.

You can also view event categories (such as “Product”) for a more detailed view.

Want to learn more? Check out: How to Use Enhanced eCommerce in GA.

Tracking Funnels ↑ Back to top

The plugin sends all events for the Shopping Behavior Analysis and Checkout Behavior Analysis reports, so you’ll see these funnels within your GA account.

Shopping Behavior Analysis

The Shopping Behavior analysis report is automatically generated from the events the plugin sends to Google Analytics. This shows general insight into store browsing experience and where customers enter or leave your purchasing funnel. This is useful to see cart and checkout abandonment for the store.

There are no settings required for the Shopping Behavior funnel; it will automatically be populated based on pageview, add to cart, checkout, and transaction events.

Checkout Behavior Analysis

The Checkout Behavior Analysis is populated with the steps the plugin has listed under its settings. This is a static funnel that is intended to be a “zoomed-in” view of the “Sessions with Check-Out” part of the Shopping Behavior funnel. The Checkout Behavior analysis gives you a more fine-grained look at where customers leave the checkout process.

While it’s most useful for sites with multi-step checkouts, this plugin will use events within this report that are relevant to any WooCommerce store, regardless of whether selling digital goods, shippable items, or other checkout processes. Please note that if you use express or off-site payment methods, especially if the customer leaves the site from the cart page, then this report may be skewed or may not have full data for your site.

There are up to 4 steps tracked, and 3 of these steps will have “Checkout options” associated with them. Google Analytics allows one checkout option per event to allow you further insight into this funnel, and the ability to create segments based on these options.

StepEventCheckout Option
1started checkoutlogged-in status (guest vs registered)
2entered billing email
3selected payment methodchosen payment method
4placed orderchosen shipping method*

*only if shipping is enabled for the store / this checkout

Tracking Subscriptions ↑ Back to top

If you have installed and activated the WooCommerce Subscriptions plugin, then you are already tracking subscriptions! There’s no need to change anything unless you want to modify the event / property names that are sent.

Subscription Events ↑ Back to top

  • Activated Subscription – Recorded when a customer’s subscription is activated. Note that subscriptions are typically only activated after successful payment. Includes properties: Subscription Name, Total Initial Payment, Initial Sign up Fee (if applicable), Subscription Period, Subscription Interval, Subscription Length, Subscription Trial Period, Subscription Trial Length
  • Subscription Trial Ended – Recorded when the free trial for a subscription ends. Includes properties: Subscription Name
  • Subscription Expired – Recorded when a customer’s subscription expires. Includes properties: Subscription Name
  • Suspended Subscription – Recorded when a customer’s subscription is suspended. Includes properties: Subscription Name
  • Reactivated Subscription – Recorded when a customer’s subscription is reactivated. Includes properties: Subscription Name
  • Cancelled Subscription – Recorded when a customer’s subscription is cancelled. Includes properties: Subscription Name
  • Renewed Subscription – Recorded when a customer’s subscription is renewed. This can happen for both automatic renewals and manual renewals. Includes properties: Billing Amount and Billing Description.

Other Information ↑ Back to top

Basic Site Tracking ↑ Back to top

Google Analytics Pro includes basic site tracking, such as pageviews and customer sessions, so no other Google Analytics plugin is needed to get complete analytics for your store.

As such, if you’ve already used the free WooCommerce Google Analytics plugin for basic or eCommerce tracking, Google Analytics Pro will deactivate this plugin upon installation.

Upgrading to v1.3.0 ↑ Back to top

When upgrading to version 1.3.0 of the plugin, you’ll notice that the global javascript function has been renamed from the legacy __gaTracker to ga. This will not affect most sites, and you can adjust the plugin settings to use ga accordingly.

However, if you have custom javascript implemented for your site, you may want to ensure that these customizations are updated to use the ga global function before changing this within the plugin settings.

You should also be aware that the completed payment event is no longer necessary. Instead, completed purchase tracks purchases for all orders, both off-site and on-site gateways. If you’ve created custom analytics goals, these should be updated accordingly.

Privacy & cookies

Cookie usage ↑ Back to top

Google Analytics uses cookies as a service to track user behavior. As such, depending on your business location, you may be required to inform users that your site places these cookies. A plugin for cookie consent may be useful for this.

GDPR & PECR

As a data controller, it is your responsibility to ensure your site and data processors you use are GDPR-compliant, abide by the PECRs, and that you have a lawful basis for data processing. So long as no personal customer data is used in your site analytics (data is anonymized), this data is not subject to the GPDR, so you should ensure that your Google Analytics account is configured accordingly.

Moz has a good overview of GDPR compliance with Google Analytics here.

Frequently Asked Questions ↑ Back to top

Q: Does this plugin support Shopping Behavior Analysis and Checkout Behavior Analysis reports?
A: Absolutely! Check out our details on tracking funnels above for more info.

Q: Will this plugin let me get my conversion rate?
A: Both the free plugin and this pro version will give Google Analytics the data it needs to calculate your site’s conversion rate. The Pro version includes more accurate conversion rate tracking since it doesn’t require purchases to end up on the “thank you” page in order to be tracked, so orders via any payment method are tracked as conversions.

Google has more details on enhanced eCommerce reporting here.

Q: Does this support WooCommerce Bookings?
A: Yes, but please be aware of the workflows in Bookings and this plugin. Orders are tracked for completion, not the booking itself. Therefore, to ensure a booking shows as a completed purchase, please adjust the order status for a booking order, which will also change the booking, rather than changing the booking status directly. This is most relevant when requiring approval or confirmation for bookings, as changing a booking doesn’t update the related order.

Q: Does this plugin track order currency?
A: Yep! Both the free and pro Google Analytics plugins for WooCommerce will track order currency. Please note that Google Analytics does not allow displaying totals in multiple currencies; it will convert each transaction to your global currency (from your account settings) each day when a different currency code is sent.

Q: Why does “paypal.com” show up as a referring source for my site? This is messing up my tracking for where orders come from!
A: This is because Google Analytics tracks the most recent site someone visited for conversions, so if a customer went to PayPal to complete a purchase and is directed back, this is tracked as the referrer.

To avoid this, please follow this guide to set paypal.com as a referrer exclusion for your account.

Q: When is a purchase considered “completed”?
A: To ensure all purchases are tracked, regardless of whether the payment takes place offsite, on-site, the gateway calls “payment completed” on the order, etc., Google Analytics Pro has to rely on the order status to indicate the financial status. As such, any order that’s marked as “processing” or “completed” will have the “completed purchase” event tracked in Google Analytics.

Q: I’m using Google Tag Manager and it looks like all my reporting is doubled! What should I do?
A: You’ll need to remove the Google Analytics portion of the code from your Tag Manager implementation.

Q: Can I use Google Tag Manager (GTM) with Google Analytics Pro?
A: ​You can certainly use Google Analytics Pro with Google Tag Manager. However, Google Analytics Pro will track all of the regular page impressions as well as the eCommerce related impressions (“viewed product”, “started checkout” etc.) automatically. In order to avoid duplicated tracking, it will be necessary to remove the other implementation of Google Analytics (by either removing that tag manager script, or removing the Google Analytics tag from your Tag Manager implementation).

Q: I prefer to keep my Google Analytics implementation and pageview tracking in Google Tag Manager. Can I still do that with Google Analytics Pro?
A: With a little bit of custom code, you can remove the Google Analyics tracking code and remove the pageview tracking from Google Analytics Pro.

Note: since customization is not covered in our support policy, we cannot further modify these or implement them directly for you.

Q: Can I connect Google Analytics Pro to new GA4 properties?
A: Not currently. We are evaluating the GA4 update to determine if and how our plugin can be updated to support it. In the meantime, for new projects, Google allows for the creation of earlier Universal Analytics properties alongside new GA4 properties. You can follow this guide from Google to set up and link a UA property under the new system. We’ve tested this setup and our plugin continues to track all the data when the UA property is selected in our settings. So while we aren’t able to take advantage of the new features in GA4 yet, the existing functionality of our plugin hasn’t been diminished by the update.

Troubleshooting ↑ Back to top

Known Issues ↑ Back to top

  • Admin / Shop Manager users are still tracked as “Visited Site” when visiting the website to login. There is no way to prevent this, since we don’t know they’re admin users until they login.
  • Only full refunds for orders are tracked, partial refunds are not supported because Google does not accept the product identifier when sending a partial refund.
  • If approving / confirming bookings via WooCommerce Bookings, please see this FAQ to ensure purchases are tracked — order statuses are what track purchases, not booking statuses.
  • Checkout Behavior Analysis reports will not use a custom set of steps. While you can name these steps whatever you’d like in your GA account, the report will consist of the pre-defined steps the plugin sends, which can be viewed on the settings page.
  • If you have orders that are pending or on hold that move to a “paid” status a day later, please note that there’s no way to tie this back to the original session for conversion tracking. GA resets these each day, so orders paid the next day or later will not have the conversion tied to the original customer session.
  • If a customer is a little click-happy and double / triple clicks an AJAX add to cart link, the “added to cart” event may be recorded multiple times. Multiple items will be added to the cart, so you may also see cart quantity changes reflected.

Other Issues ↑ Back to top

Not seeing tracking data in Google Analytics? It can take up to 24 hours for data to populate, so please keep this in mind.

If it’s been longer than 24 hours, please follow these steps to make sure everything is setup correctly before posting a support request:

Woocommerce Google Analytics Pro

  1. Check that your tracking ID is correct or that you are authenticated with Google Analytics.
  2. Double-check that your tracking ID is correct 😉
  3. View the source of your homepage to make sure the Google Analytics javascript code exists. If you’ve added this javascript manually, it needs to be removed, as it will override the data the plugin sends to Google Analytics.
  4. If you see “No HTTP Response detected” errors, please disable product impression tracking on archive pages.
  5. If Google Analytics still isn’t working, please enable logging and submit a help request detailing what happened while following these steps and describing the issue so we can help you quickly! Add the log as an attachment is also helpful.

Woocommerce Google Analytics Not Working

For Developers ↑ Back to top

Tracking Custom Events

You can track custom events by using:

Event name can be set as a string, while properties are passed as an array with property name => value.

Search

You can modify this sample snippet according to your needs with the help of a developer:

The custom_event() can also be called without properties by omitting the second parameter.

Questions & Support ↑ Back to top

Have a question before you buy? Please fill out this pre-sales form.

Already purchased and need some assistance? Get in touch with support via the help desk.