WooCommerce Google Analytics Pro (original) (raw)

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.

Google 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!

To start using a product from WooCommerce.com, you can use the “Add to store” functionality on the order confirmation page or the My Subscriptions section in your account.

  1. Navigate to My Subscriptions.
  2. Find the Add to store button next to the product you’re planning to install.
  3. Follow the instructions on the screen, and the product will be automatically added to your store.

Alternative options and more information at Managing WooCommerce.com subscriptions.

Note: You’ll need to go through the setup/migration process in your Google account before configuring the plugin.

For the plugin to connect to Google Analytics, you’ll first need to set up a GA4 property with a Data Stream for receiving tracking data from your site. Depending on your existing configuration, you will start from one of the three following options (you do not need to complete all three):

Option 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.

Once you’ve created a GA4 property, you’ll also need to ensure that a Data Stream and a Measurement Protocol API secret are created so the plugin can send tracking data to Google.

To setup a Data Stream you can:

Note you can skip the tag installation instructions that pop up automatically after you’ve created your Data Stream as this isn’t required for use with the plugin.

With your Data Stream created, you can now configure the Measurement Protocol API secret:

Web stream details page with a red box highlighting the Measurement Protocol API Secrets tab.

*If you aren’t already on the Data Streams page, you can go back and follow the first three steps of our Data Stream setup above and then select the data stream you’ve created for the plugin.

As soon as you’ve created your new GA4 property and configured the Data Stream and the Measurement Protocol API secret, you can move to the next section to start configuring the plugin settings.

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.

Google Analytics Pro settings page showing Tracking settings and options.

Plugin Settings

Since our plugin will temporarily support tracking using both the UA and GA4 properties, some events listed below may not be visible until certain criteria are met (e.g. a GA4 property is connected).

With the introduction of the simultaneous tracking of both UA and GA4 properties, the plugin shows the different events split into sections. More specifically:

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.

View of the Recommended Events (GA4) list in the plugin settings page.

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.

View of the Custom Events (GA4) list in the plugin settings page.

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

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 requested plugin permissions. Click “Allow”.
    WooCommerce Google Analytics Authenticate account
  2. This will populate the profile dropdown with your Google Analytics properties.
    WooCommerce Google Analytics Pro select property
  3. Select the correct property from the list and save your settings.
    WooCommerce Google Analytics Pro authenticated

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.

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

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

View of Events under the Reports > Engagement > Events menu in the Google Analytics account.

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.

  1. From the left menu select Explorations.
  2. Click on the Funnel Exploration module and a new report will be created:

Google Analytics account showing the Explorations tab, with a red box highlighting the Funnel Exploration module tile.

  1. Your Funnel Exploration will be listed in the table below the module tiles. Click on that row to view the data.

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

Clicking on the Funnel row from the Explorations page brings up the Variables and Settings information as well as the Exploration report.

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.

View of the Subscription Events (GA4) list in the plugin settings page.

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.

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.

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.

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.

Q: Can I connect Google Analytics Pro to new GA4 properties?
A: Yes! We added support for GA4 in v2.0.0 and you can learn how to get started above.


Q: Does this plugin support Shopping Behavior Analysis and Checkout Behavior Analysis reports?
A: Absolutely! Check out our details on Funnels Exploration 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.


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 Analytics 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.

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:

  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.

Tracking Custom Events

You can track custom events by using:

wc_google_analytics_pro()->get_tracking_instance()->get_event_tracking_instance()->custom_event( eventname,event_name, eventname,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.

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.