Commerce Apps for Storefront Next

GA4 Analytics + Intelligence Platform

Track every shopper interaction. Query your data in plain English. Personalize your storefront with AI. Built for Salesforce B2C Commerce.

Self-service install · No developer required after setup
The Problem

Analytics on Storefront Next shouldn't require a data team

Three gaps every B2C Commerce merchant hits when they try to make GA4 and their storefront work together.

01

Disconnected data

GA4 tracks events. Business Manager holds catalog data. Neither talks to the other. Merchants switch between dashboards to answer basic questions.

02

One-size-fits-all content

Every shopper sees the same homepage. No personalization at the content layer. Promotions are manual, not data-driven.

03

Configuration complexity

Setting up GA4 on Storefront Next requires developer involvement for every change. Environment variables, code deployments, technical overhead.

Plans

Two tiers, one platform

Start with self-service tracking. Upgrade to the Intelligence Platform when you're ready for AI analytics and personalization — your tracking carries straight over.

Tier 1 · Basic

GA4 Tracking

Contact for pricing

Self-service GA4 integration. Install the Commerce App, configure in Business Manager, start tracking.

  • Automatic page_view / view_item / begin_checkout / purchase events
  • Configure Measurement ID in Business Manager
  • Enable / disable tracking toggle in Custom Preferences
  • Debug mode for event verification
  • Commerce App installed in BM with setup tasks
  • No developer required after install
View Setup Guide →

Both tiers are self-service to install · GA4 tracking included at every level

Setup

Step-by-step setup

From install to insights in minutes.

Step 0

Before you start

A few things need to be in place before Commerce Ace GA4 Analytics can track. Skim both lists — the second one saves support tickets later.

Requirements
  • A Salesforce B2C Commerce instance with Storefront Next deployed.
  • CommerceAppsEnabled toggle activated on the instance (contact your Salesforce administrator).
  • A Google Analytics 4 property with a Web data stream configured.
  • API client credentials (client ID and secret) with WebDAV write permission for Commerce App installation.
  • Access to Business Manager with Merchant Tools permissions.
Out of scope
  • ×Tracks storefront events only — not Business Manager activity or backend operations.
  • ×The Commerce App doesn't modify storefront code. Extension components must be integrated into your Storefront Next build by a developer during initial setup.
  • ×GA4 data processing has a 24–48 hour delay. Real-time verification uses GA4 DebugView, not standard reports.
  • ×The Basic tier doesn't include the Analytics Agent, personalization, or Contentful integration — those require the Intelligence Platform (Pro tier).
  • ×The app doesn't create or configure your GA4 property. You must have an existing property with a Web data stream before installation.
01
Commerce Apps Framework

Install the Commerce App

Install the Commerce Ace GA4 Analytics app using the Salesforce B2C CLI. The app package includes the storefront extension components, admin configuration, custom site preference definitions, and a setup task checklist.

B2C CLI b2c cap install commerce-ace-ga4-v1.0.0.zip -i {instance} --server {server} --site-id {siteId} --client-id {clientId} --client-secret {secret} --clean-archive

After installation, the app appears under Merchant Tools → Ordering → Commerce Apps → Analytics → Additional Setup.

Tip The app icon and setup tasks are visible immediately after install. No server restart required.
Commerce Apps page in BM — Analytics card with the Commerce Ace icon
View full size
02
Custom Site Preferences

Configure in Business Manager

Navigate to Merchant Tools → Site Preferences → Custom Preferences. Find the Commerce Ace GA4 Analytics group. Three fields are available:

GA4 Measurement ID
Your GA4 Measurement ID in the format G-XXXXXXXXXX. Find it in GA4 Admin → Data Streams → select your Web stream → Measurement ID.
Enable Commerce Ace GA4 Tracking
Set to Yes to activate event tracking on the storefront. Default is No.
GA4 Debug Mode
Set to Yes to send events with the debug_mode flag. Use with GA4 DebugView to verify events fire correctly. Turn off for production.
Tip Changes to Custom Preferences take effect on the next storefront page load. No redeployment needed.
Custom Preferences screen — Commerce Ace GA4 Analytics group with the three fields
View full size
03
Storefront Next Build

Integrate extension components

The Commerce App package includes extension components that need to be added to your Storefront Next storefront. Copy the extension folder from the app package into your storefront's src/extensions/ directory. The extension registers four components via target-config.json:

CommerceAceGa4Provider
Root provider that loads gtag.js and fires page_view events on every route change.
ProductViewTracker
Fires view_item on product detail pages using the storefront's product context.
CheckoutTracker
Fires begin_checkout on the checkout page using the storefront's basket context.
PurchaseTracker
Fires purchase on the order confirmation page, fetching order details via SCAPI.

After adding the extension, deploy the storefront to Managed Runtime.

Tip The extension auto-discovers via the Vite plugin that scans src/extensions/**/target-config.json. No manual registration required.
VS Code — the extension folder structure inside src/extensions/
View full size
04
GA4 DebugView

Verify tracking

Enable Debug Mode in Business Manager Custom Preferences (step 02). Open Google Analytics → Admin → DebugView. Browse your storefront in a separate tab. Confirm these events appear:

page_view
Fires on every page navigation.
view_item
Fires when a shopper views a product detail page.
begin_checkout
Fires when a shopper reaches the checkout page.
purchase
Fires on the order confirmation page after a successful order.

Each event includes standard GA4 parameters: currency, value, and item details (ID, name, price, quantity).

Tip DebugView shows events in real time. Standard GA4 reports have a 24–48 hour processing delay.
GA4 DebugView — the four events firing in real time
View full size
05
ai.commerceace.com · Optional

Upgrade to Intelligence Platform

Sign up at ai.commerceace.com for the Pro tier. The Intelligence Platform adds AI-powered analytics and personalization on top of the Basic GA4 tracking. Connect your GA4 property:

  • Enter your GA4 Property ID (numeric ID from GA4 Admin → Property Settings).
  • Enter your GA4 Measurement ID.
  • Connect your Google account via OAuth for read-only GA4 Data API access.

Once connected, you can:

  • Ask the Analytics Agent questions in plain English.
  • Toggle GA4 tracking on or off from the dashboard — no BM or redeployment needed.
  • Enable the Personalization Engine for segment-targeted content.
Intelligence Platform Analytics page — the GA4 connection panel
View full size
Settings

Configuration guide

Every setting lives under Site Preferences → Custom Preferences → Commerce Ace GA4 Analytics. Sensible defaults ship at install.

SettingWhat it doesRecommendation
GA4 Measurement ID The G-XXXXXXXXXX identifier for your GA4 Web data stream. Events are sent to this property. Required. Find in GA4 Admin → Data Streams → Web.
Enable Commerce Ace GA4 Tracking Master on/off switch for all event tracking on the storefront. Set to Yes when ready to go live.
GA4 Debug Mode Sends events with the debug_mode flag so they appear in GA4 DebugView for real-time verification. Yes during setup and QA. No for production.
Intelligence Platform Measurement ID On the Pro tier, the Measurement ID can be managed from ai.commerceace.com. The Intelligence Platform value takes priority when set. Use to manage tracking from the Intelligence Platform dashboard instead of BM.
Intelligence Platform Tracking Toggle On/off switch in the Intelligence Platform sidebar. Controls tracking without BM access or redeployment. Available on Pro tier only.
Best practices

Merchant recommendations

What we tell every Commerce Ace merchant on their onboarding call.

Start with Debug Mode

Enable Debug Mode first, verify all four events in DebugView before turning it off for production.

Check your data stream

Make sure your GA4 property has a Web data stream configured with the correct domain. Mismatched domains mean events show up but aren't attributed properly.

Wait 48 hours for reports

GA4 processes data with a 24–48 hour delay. DebugView is real-time, but standard reports (Engagement, Monetization) take time to populate.

Use the Analytics Agent for quick answers

Instead of building custom reports in GA4, ask the Intelligence Platform: "top 5 products by revenue last week." Faster and easier.

Don't run duplicate tracking

If you already have gtag.js from another integration, remove it before enabling Commerce Ace GA4 Tracking. Duplicate tags send duplicate events.

Test across key pages

After setup, visit a PDP, start a checkout, and complete a test order to confirm all four event types fire correctly.

FAQ

Frequently asked

What events does the Commerce App track?

Four e-commerce events: page_view (every navigation), view_item (product detail pages), begin_checkout (checkout page), and purchase (order confirmation). All events include currency, value, and item-level details.

Does the app work with Storefront Next only, or also SFRA?

Storefront Next only. The app uses the Storefront Next extension system (UI targets, React components, useConfig). It is not compatible with SFRA or SiteGenesis.

Do I need a developer after initial setup?

For the Basic tier, no. Once the extension components are integrated and deployed, the merchant configures everything in Business Manager. For the Pro tier, the Intelligence Platform dashboard is fully self-service.

How does the Intelligence Platform toggle work without redeployment?

The storefront calls the Intelligence Platform API on every page load. The API returns the current tracking configuration (measurement ID and enabled/disabled). The storefront loads or skips gtag.js based on that response.

Can I use my existing GA4 property?

Yes. The app sends events to whatever Measurement ID you configure. It does not create a new property.

What is the difference between Measurement ID and Property ID?

The Measurement ID (G-XXXXXXXXXX) identifies the data stream and is used by gtag.js to send events. The Property ID (numeric, like 538044450) identifies the GA4 property and is used by the Analytics Agent to query the GA4 Data API. Both come from the same GA4 property.

Is my Google account data secure?

The Intelligence Platform uses Google OAuth with read-only GA4 scope (analytics.readonly). It cannot modify your GA4 configuration or access other Google services. Tokens are stored encrypted and refresh automatically.

Can I use the app on multiple sites?

Each site needs its own Commerce App installation and Measurement ID configuration. The Intelligence Platform supports multiple storefronts per account on the Pro tier.

Architecture

Six systems. One adapter pattern.

Storefront Next on Managed Runtime. Contentful for content. Intelligence Platform for AI. Business Manager for commerce. GA4 for analytics. All connected.

Commerce Ace platform architecture — shopper-facing storefront, integration layer (Contentful, Intelligence Platform, GA4), and commerce backend (Business Manager, SCAPI, Neon PostgreSQL)
StorefrontSalesforce Managed Runtime
Intelligence PlatformFly.io
DatabaseNeon · serverless PostgreSQL
Get started

Ready to add intelligence to your storefront?

Install GA4 tracking today, then upgrade to the Intelligence Platform whenever you're ready for AI analytics and personalization.