Learn how to set up and manage Spree’s native Google Analytics 4 integration.
Spree Commerce comes with a native Google Analytics 4 integration that allows you to track user behavior, sales performance, and marketing effectiveness across your store. With minimal setup required, you can gain valuable insights into how visitors interact with your site, which can help you make informed decisions to improve conversions, user experience, and overall business strategy.
To set up the Google Analytics integration, you must have a Google Analytics account and an associated property.
Sign in to your Spree admin dashboard and navigate to the Integrations tab.Locate the Google Analytics tile under Analytics, and click Connect Google Analytics.This will redirect you to the setup page for Google Analytics integration.Simply enter the Measurement ID from your Google Analytics account into the field and click Create to finalize the integration.
You can find the Measurement ID in the Home screen of your Google Analytics dashboard, if no data has been collected yet. Otherwise, it can be found by navigating to Admin settings > Data Streams and then clicking on the property associated with your Spree site.
If you’d like to remove Google Analytics from your site, simply revisit the integration’s setup form and click Delete on the lower right hand side.You can also switch out the Measurement ID if you’d like to switch the Google Analytics property that your site is connected to.