Google Analytics is a free analytics tool that helps you track visitors and conversions on your store. It allows you to gain further insight into your visitors, such as which pages they visit most, what channels drive the most traffic to your store, and which products perform best. Google Analytics 4 (GA4) is Google’s next-generation measurement solution.

 

How It Works

Events are built into the storefront, and event data is automatically sent to Google when you set up the integration. You don’t need to create or add any scripts to the control panel, or manually create events in your Google Analytics account.

For more information on our integration’s supported ecommerce events and BODL field mapping, see Google Analytics 4 | Events.

Our GA4 integration supports consent mode, which adapts the behavior of Analytics, Ads, and third-party tags that create or read cookies based on shoppers’ cookie preferences.

If cookie consent tracking is enabled on your storefront, and a shopper declines Analytics cookies, Google does not store or read cookies of the shopper’s behavior. Instead, a minimum amount of information is sent to Google using cookieless pings. Google fills the data collection gaps using conversion modeling and behavioral modeling. See Consent mode on websites and mobile apps for more information.
 

 

Requirements

  • To access and edit web analytics tools, you must have the Manage Web Analytics permission enabled on your user account.
  • You will need to create a Google Analytics account if you don’t already have one. Some merchants with multiple storefronts may wish to create a separate account for each storefront.
  • You will need your GA4 Measurement ID.
  • Your storefront must be using a Stencil theme.
  • You must be using a BigCommerce storefront.
  • Your store must be using Optimized One-Page Checkout.
 

Setup

Google Analytics

If this is your first time setting up analytics for your store, see Google’s documentation to [GA4] Set up Analytics for a website and/or app.

  • Select Web as the data stream type.
  • We recommend keeping enhanced measurement enabled.
  • You can skip Set up data collection for websites; the integration will add the tag automatically.

To find your Measurement ID, go to AdminData Streams and click on your storefront’s stream. Make sure that you have selected the appropriate account and property at the top of the screen.

Measurement ID in Google Analytics for a GA4 property

BigCommerce

Go to Settings › Data Solutions and click Connect next to Google Analytics 4.

If you are using Multi-Storefront, go to Channel Manager and click on Edit storefront settings for your storefront. Click Data Solutions from the left navigation, then click Connect next to Google Analytics 4.

Google Analytics 4 in Data Solutions

Enter your Google Analytics Measurement ID and click Connect.

Tracking refunds through the refund event requires an API secret. See Google’s documentation for instructions on how to create a new secret in your Google Analytics account. This is optional and can be added later if needed.

Measurement ID and API secret fields when setting up GA4

Once connected, you can use the Realtime or DebugView reports to confirm you’re collecting data from your store. Some reports can take 24 to 48 hours to process data from your store.

 

Using Tag Manager? To avoid data collection interference, we recommend disabling Tag Manager. If you must keep Tag Manager enabled, disable all events supported by the native integration, as well as the automatically collected events marked as (web).

 

FAQ

Why are refunds not tracking through the refunds event?

The refund event is not tracked automatically and requires additional setup. You’ll need to create an API secret in your Google Analytics account and enter it in the BigCommerce control panel in the Google Analytics 4 settings under Data Solutions.

Can I use the GA4 integration with a headless storefront?

No. As storefront traffic is not taking place on BigCommerce servers, the integration is unable to track events. Work with a developer to set up custom tracking for your headless storefront.

I’m using a custom checkout, can I use the GA4 integration?

Using a custom checkout with our GA4 integration is not supported.