Configuring Google Analytics 4

To use Google Analytics 4 (GA4), you must have an Analytics account and a GA4 property defined for the website you want to track. When you create your account and property, GA4 assigns a unique tracking ID for the property. Use the Tracking ID to implement GA4 on your Commerce website.

In your GA4 account, set up a data stream to start collecting data. See the following help topics for information about configuring GA4 for your Commerce website:

Set Up Analytics Account and Google Analytics 4 Property

If you don't have an Analytics account and GA4 property, use the following procedure to create them. If you already have an Analytics account and GA4 property, follow the instructions in the Google support topic, What happened to my Tracking ID? to find your Tracking ID.

To set up your Analytics account, follow the instructions provided on Google’s support website. See Get started with data analytics.

To create a new GA4 property, follow the instructions provided on Google’s support website. See Create a new Google Analytics 4 property.

Set Up Ecommerce Measurement with Google Analytics 4

For GA4 to measure ecommerce activity, set up ecommerce events in your Analytics account to collect information about the shopping behavior of your users. Follow the instructions provided in Google’s developer documentation to set up ecommerce events. See Measure ecommerce.

Define Unwanted Referrals

GA4 lets you block referring domains by setting up unwanted referrals, also called referral exclusions. These exclusions help make referral traffic reporting more accurate.

Referral exclusions are useful if you use a third-party shopping cart. With a third-party shopping cart, shoppers are sent to a third-party site to check out and then brought back to your site after checkout. If you don't set up the unwanted referral, the first session ends when visitors are sent to the third-party site, and a new session starts when they return to your site after checkout. Coming back to your site is counted as a referral from the third-party site, so the session count gets skewed because the first session didn't track the entire transaction.

When you set up an unwanted referral, the same session is used from start to finish, giving you more accurate referral traffic results.

If you're using NetSuite as your checkout domain, it's important to set a referral exclusion for the shopping domain. If you don't create the referral exclusion, the shopping domain shows as a self-referral and skews your data.

Note:

If you use a single secure domain for checkout and shopping, there is no need to create referral exclusions. Referral exclusions are necessary only when the checkout and shopping domains are different. See Set Up Domains for Web Stores.

For more information about unwanted referrals, including instructions on how to configure them on your Analytics account, go to Identify unwanted referrals on the Google support site.

Set Up Site Search

Site Search lets you understand the extent to which users took advantage of your website’s search function, which search terms they entered, and how effectively the search results created deeper engagement with your site.

For more information about Site Search, including instructions on how to set up Site Search, go to Set up Site Search on the Google support site.

Related Topics

General Notices