Overview
↑ Back to topGoogle Analytics Pro now supports GA4 properties! Learn about migrating to our GA4 implementation, or setting up for the first time.
Not sure if you need the free plugin or this Pro version? Check out our comparison here.
As of WooCommerce 8.3, Cart and Checkout blocks are available as the default experience. WooCommerce Google Analytics Pro is now compatible with those blocks!
Installation
↑ Back to top- Download the extension from your WooCommerce dashboard
- Go to Plugins > Add New > Upload and select the ZIP file you just downloaded
- Click Install Now, and then Activate
- Click the Configure link and read the Setup and Configuration section to learn how to get started with the plugin!
Setup and Configuration
↑ Back to topGoogle Account Configuration
↑ Back to topOption 1: Using an existing GA4 property
If you already have a GA4 property that you’d like to use and just need to connect it to the plugin, you can skip to the Data Stream & API Secret steps below to make sure your property is ready for connection.Option 2: Migrating from a UA property
If you’re currently using a Universal Analyics property and want to start tracking via GA4, we recommend checking these help articles for guidance on how to complete the migration in your Google Analytics Dashboard. Please note you can skip the tag installation instructions that pop up automatically after you’ve created your GA4 property as this isn’t required for use with the plugin. Once you’ve completed the migration to GA4, you can get started on the Data Stream & API Secret steps below to configure your new property for connection to the plugin.Option 3: New account setup
If you’re getting started with Google Analytics and setting up an account for the first time, you can follow this guide for setting up a new Analytics account with a GA4 property and Data Stream for tracking.Data Stream & API Secret
↑ Back to top- Go to your Google Analytics dashboard and ensure you’re connected to the GA4 property you want to change. You can check that on the top of the page under the All accounts > [username] dropdown.
- Then, click on the Admin button (cog icon) at the lower left side of the screen.
- Click on Data Streams option under the Property column.
- Click Add Stream and select Web from the dropdown options.
- Enter your site’s address into the Website URL field.
- For Stream Name, enter “WooCommerce Google Analytics Pro”. NOTE: The Stream Name must match this text exactly in order for the plugin to connect correctly.
- Ensure Enhanced measurement is enabled if you’d like to track these additional features, and click Create stream.
-
- Starting from the Data Stream that you just created*, find the Measurements Protocol API secrets section and click on it.
- Click on the Review terms button on the top of the page and click on I acknowledge when you’re ready.
- Click on the Create button that can be found in the upper right corner, next to the search field.
- Enter “WooCommerce Google Analytics Pro” as the nickname. Just like with the Data Stream above, it’s required that the nickname match this text exactly in order for the plugin to connect correctly.
- Click on the Create button again.
Extension Settings
↑ Back to top- Authenticate/Re-authenticate with your Google Account – In this step you’ll need to authenticate using the Google account where your properties were created. After authenticating with Google, you’ll notice two fields:
- Google Analytics 4 Property (GA4) – After authenticating your Google account, you can click here to get a dropdown of all the GA4 properties conencted to your account. Our plugin will automatically list your properties in the dropdown, however, new properties that are created after authenticating may take a few minutes to appear. Once you’ve selected a property and clicked Save Changes, the plugin will automatically setup a Data Stream and API connection to begin tracking via GA4. If you want to stop tracking data with the selected property, you can clear the field and select Save changes to stop the plugin from sending data to that property.
- Universal Analytics Property (UA) – Similar to the GA4 property, this field will automatically sync with your Google Analytics account and allow you to choose the UA property you want to use for tracking. Please note that UA properties are expected to stop tracking data on July 1, 2023. Our plugin will support tracking with both properties until UA is shut down to ensure that your site’s measurement isn’t interupted, however, if you’re ready to stop tracking from the UA property already, then you can clear this UA Property field and click Save changes button to stop.
- Revoke authorization – If you want to revoke the authorization to your current account, you can click on this button and our plugin will automatically clear the connection and stop the tracking. You can then authorize a new account or re-authorize your old account to continue tracking later.
- Enable Google Analytics Tracking – Enable / check this to enable Google Analytics tracking. Disable this to disable tracking completely.
- Debug Mode – 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.
- 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 this allows you to track all events for a logged in user to the same user ID, even across multiple devices, making your user count more accurate. Kindly note that all options that include the (UA only) text at the end of their name will not be available after UA stops working and will not be visible if a UA property isn’t connected.
- Enable Google Optimize – Select to integrate Google Optimize with Google Analytics.
- Track product list views (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.
Event Names
↑ Back to topRecommended Events (GA4)
These events are used in Google’s automated reporting in your Google Analytics dashboard. We recommended that you do not customize these events as it can cause this automated reporting to not work as expected. That said, if you’d like to stop tracking for a specific event, you can leave that field blank.- Login – 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).
- Sign up – Triggered when a visitor registers an account. Hooks into the WordPress registration system and will track registrations anywhere the WordPress registration form is used.
- Add 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 will track as well if they are connected to that hook.
- Remove from Cart – Triggered when a visitor removes an item from their cart.
- View Cart – Triggered when a visitor views the cart. This will track even if the cart is empty.
- Begin Checkout – Triggered when a visitor begins the checkout process, specifically when the ‘woocommerce_after_checkout_form’ action fires.
- Add Shipping Info – Triggered when a customer selects a shipping method at checkout.
- Add Payment Info – Triggered when a customer selects a payment method at checkout.
- Purchase – Triggered when a customer’s purchase has been submitted or paid for. This will track for gateways that immediately complete payment, such as credit cards, or those that place the order for a later payment, such as a “Check Payment” order.
- Refund – Triggered when an order has been fully refunded.
Custom Events (GA4)
Custom events are tracked using our plugin, however, these are not tied to Google’s automated reporting so you may need to adjust your reporting tables in Google Analytics to view this data. You can find more information here. You can leave a field blank if you want to stop tracking a specific event.- Logout – Triggered when a customer signs out. Identities are cleared upon logout, so you can accurately track multiple users from the same device/IP if they use different logins and user ID tracking is enabled.
- View Sign Up – Triggered when a visitor views the sign up (my account / registration) page. Hooks into the WordPress registration form and will track anywhere it is used.
- View Homepage – Triggered when a visitor views the site’s homepage.
- View Item List – Triggered when a customer views a list of products, for example the shop page or related products under a single product page.
- View Item – Triggered when a visitor views a single product.
- Select Item – Triggered when a visitor clicks on a product in a listing, such as from the shop page or in search results.
- Change 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. If that’s the case, you may want to disable this event.
- Apply Coupon – Triggered when a visitor applies a coupon on either the cart or checkout.
- Remove Coupon – Triggered when a visitor removes a coupon either from the cart or during checkout.
- Provide Billing Email – Triggered when a visitor provides a billing email on the checkout page.
- Place Order – Triggered when a customer places an order via checkout.
- Start 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.
- 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.
- Comment – Triggered when a visitor writes a comment on a blog post. This is tracked before spam processing, so if you get a lot of comment spam, you may consider disabling this event as well.
- View Account – Triggered when a logged-in customer views the ‘My Account’ page.
- View Order – Triggered when a customer views an order.
- Update Address – Triggered when a customer updates their billing or shipping address, either from their account area or during checkout.
- Change Password – Triggered when a customer changes their password.
- Estimate Shipping – Triggered when a visitor estimates shipping from the cart page.
- Track Order – Triggered when a customer submits the ‘Order Tracking’ form.
- Cancel Order – Triggered when a customer cancels a Pending order. Paid orders will need to be refunded so can be tracked via the “Refund” event described above.
- Reorder – Triggered when a customer reorders a previous order.
Universal Analytics Events
Every UA 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. 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 you can accurately track multiple users from the same device/IP if they use different logins and user ID tracking is enabled.
- Viewed Signup – Triggered when a visitor views the sign up (my account / registration) page. Hooks into the WordPress registration 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 registration form is used.
- Viewed Homepage – Triggered when a visitor views the site’s homepage.
- Viewed Product – Triggered when a visitor views a single product. The ‘Product Name’ is tracked as the event label.
- Clicked Product – Triggered when a visitor clicks on a product in a listing, such as the shop page or search results. The ‘Product Name’ is tracked as the 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 will track as well if they use that hook. 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 track even 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.
Checkout Funnel Settings (UA only)
↑ Back to topAuthenticating with GA
↑ Back to topAuthenticating
To authenticate the plugin with your Google Analytics account, click the “Authenticate” button in the plugin settings. This will begin the authentication process.- Google will ask you to allow the requested plugin permissions. Click “Allow”.
- This will populate the profile dropdown with your Google Analytics properties.
- Select the correct property from the list and save your settings.
Your GA Account
↑ Back to topTracking Funnels
↑ Back to topShopping 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 (UA only)
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.Step | Event | Checkout Option |
---|---|---|
1 | started checkout | logged-in status (guest vs registered) |
2 | entered billing email | – |
3 | selected payment method | chosen payment method |
4 | placed order | chosen shipping method* |
Tracking Subscriptions
↑ Back to topSubscription 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 topBasic Site Tracking
↑ Back to topUpgrading to v1.3.0
↑ Back to top__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
↑ Back to topCookie usage
↑ Back to topGDPR & PECR
↑ Back to topFrequently Asked Questions
↑ Back to topQ: 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 on this Universal Analytics feature.
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 in Universal Analytics 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.
Troubleshooting
↑ Back to topKnown 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- Check that your tracking ID is correct or that you are authenticated with Google Analytics.
- Double-check that your tracking ID is correct 😉
- 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.
- If you see “No HTTP Response detected” errors, please disable product impression tracking on archive pages.
- 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.
For Developers
↑ Back to topTracking Custom Events
You can track custom events by using:wc_google_analytics_pro()->get_tracking_instance()->get_event_tracking_instance()->custom_event( $event_name, $properties );Event name can be set as a string, while properties are passed as an array with property name => value. You can modify this sample snippet according to your needs with the help of a developer:
if ( ! function_exists( 'my_custom_event_function' ) ) { function my_custom_event_function() { // check if Google Analytics Pro is active if ( ! function_exists( 'wc_google_analytics_pro' ) ) { return; } wc_google_analytics_pro()->get_tracking_instance()->get_event_tracking_instance()->custom_event( 'Event name', array( 'Property name' => 'value' ) ); } add_action( 'hook_to_trigger_event_on', 'my_custom_event_function' ); }The
custom_event()
can also be called without properties by omitting the second parameter.