Next Commerce
Apps

Google Analytics 4

Track storefront ecommerce events in GA4, with optional Google Ads conversions

The Google Analytics 4 app adds the Google tag to your storefront and sends GA4 ecommerce events, from product views through purchase, to your GA4 property. It can also send a Google Ads conversion when an order is completed.

Google Analytics 4 is an installable app. Enable it from the Apps menu on your NEXT Dashboard.

The app works with any storefront theme and needs no theme edits. It loads the Google tag through the theme's global header app hook and sends events through NEXT's storefront event tracking, so it covers your storefront and checkout. Pages hosted outside your NEXT storefront, such as external funnels, need their own tracking.

Set Up Google Analytics 4

  1. Install Google Analytics 4 from the Apps menu and open its settings.
  2. Tick Enable Google Analytics.
  3. Enter your Google Analytics Measurement ID, in the format G-XXXXXXXXXX.
  4. Save.

The app does nothing until a Measurement ID is set. Ticking Enable Google Analytics on its own does not load the Google tag.

Settings

SettingWhat it does
Enable Google AnalyticsTurns the app on. Nothing loads until a Measurement ID is also set.
Google Analytics Measurement IDYour GA4 Measurement ID, G-XXXXXXXXXX.
Enable Google Ads Conversion TrackingSends a conversion to Google Ads when an order is completed. Needs the Conversion ID and Conversion Label below.
Google Ads Conversion IDYour Google Ads tag ID, for example AW-123456789. A number without the AW- prefix also works.
Google Ads Conversion LabelThe label from your Google Ads conversion action.
Enable Debug ModeSends events in debug mode, so they appear in GA4 DebugView in real time.
Skip Test OrdersDoes not send purchase or the Google Ads conversion for test orders.

Tracked Events

The app sends these GA4 recommended ecommerce events:

Storefront activityGA4 event
Customer views a category or collection pageview_item_list
Customer views a productview_item
Customer adds a product to the cartadd_to_cart
Customer removes a product from the cartremove_from_cart
Customer starts checkoutbegin_checkout
Customer submits a shipping methodadd_shipping_info
Customer completes an orderpurchase

The Google tag sends page_view on every page load. If a customer is signed in to their storefront account, their customer ID is sent to GA4 as the user_id.

Values and Items

  • Every money value is sent as a number in the order's currency.
  • value on begin_checkout, add_shipping_info and purchase is item revenue: the sum of the line prices excluding tax. Shipping and tax are sent separately in the shipping and tax parameters.
  • transaction_id on purchase is the NEXT order number.
  • Items use the same identifiers on every event, so GA4 item reports join across the funnel: item_id is the product ID, and sku and item_variant identify the variant.
  • The first voucher applied to the cart or order is sent as coupon.
  • view_item_list uses the page path as the list ID and the page title as the list name. GA4 accepts up to 200 items per event, so longer lists are cut to the first 200.

With Enable Google Ads Conversion Tracking on and both a Conversion ID and Conversion Label set, the app sends a Google Ads conversion on every completed order, alongside the GA4 purchase event. The conversion carries the order number as the transaction ID, and the order total, including shipping and tax, as its value.

If the Conversion ID or Conversion Label is missing or not in the format Google Ads issues, no conversion is sent.

To send your product catalog to Google Merchant Center for Google Ads, see Google Merchant XML Feed.

Good to Know

  • Every GA4 event is addressed to the Measurement ID in the app settings. If another Google tag is on the page, it does not receive these events.
  • If your theme, or a tag in Google Tag Manager, already loads the Google tag for the same Measurement ID, remove it so page views are not counted twice.
  • Use Enable Debug Mode with GA4 DebugView to check events while testing, then turn it off.

On this page