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 do not 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 exclude referring domains by defining unwanted referrals, which are also known as referral exclusions. These exclusions help promote accurate referral traffic reporting.

Referral exclusions are useful if you use a third-party shopping cart. If you use a third-party shopping cart, shoppers who visit to your site and purchase a product are redirected to a third-party site for checkout and then returned to your site after checkout. If you do not identify the unwanted referral, the first session ends when the visitor is redirected to the third-party site and a new session begins when the visitor is returned to your site after checkout. Returning to your site is seen as a referral from the third-party site. Therefore, the session count is skewed because the first session did not follow the visitor throughout their entire transaction.

By defining an unwanted referral, the same session is used from start to finish, which provides more accurate referral traffic results.

If you use NetSuite as your checkout domain, it is important to set a referral exclusion for the shopping domain. If you do not create the referral exclusion, the shopping domain appears 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

Google Analytics 4
Enable Google Analytics 4 in NetSuite
Google Analytics 4 Conversion Events
Migrating from Google Universal Analytics to Google Analytics 4
Google Analytics with ShopFlow and Site Builder

General Notices