Google Analytics with ShopFlow and Site Builder
ShopFlow and Site Builder only support basic Google Analytics features, such as page hits and geolocation data. Site Builder doesn't have a data layer that supports Google Universal Analytics or Google Analytics 4 (GA4) so advanced tracking, like e-commerce tracking, is not possible.
To implement Google Analytics on a Site Builder website, see the following help topics:
Configure Google Analytics 4 for ShopFlow and Site Builder
See the following topics for information about setting up a GA4 account for your Site Builder site:
Add GA4 Tracking Code to ShopFlow and Site Builder
Add the code snippet from Google Tag Manager (GTM) or GA4 in the Addition to <head> field on the Analytics tab of the website setup record for all your websites.
If you're already using GTM, you may not need to replace any code snippets. You will need to add the new service to GTM.
To add the GA4 tracking code to Site Builder:
-
Go to Commerce > Websites > Website List.
-
Click the Edit link for next to your Site Builder Site.
-
Go to the Analytics tab.
-
Paste the GTM or GA4 code snippet, including your GA4 tracking code, into the Addition to <head> field.
The following example shows what your code snippet might look like:
-
Check the Enable Google Analytics Integration box.
-
Click Save.
-
Repeat steps 1 through 7 for all your websites.
Enable GA4 for Checkout
If you want to use Site Builder with Checkout, enable GA4 in the checkout application by setting your GA4 tracking ID and checkout domain. Once it's set up, GA4 enables you to track website activities from your homepage to your purchase confirmation page.
To enable GA4 for checkout:
-
Go to Commerce > Websites > Configuration.
-
Select your website and domain and click Configure.
-
Go to the Integrations tab and the Google Analytics 4 subtab.
-
Set feature properties as required. For more information about each configurable property, see Google Analytics 4 Subtab.
-
Click Save.
GA4 with Site Builder with SiteBuilder Extensions and an External Site
If you're using an External Site (WSDK) with your Site Builder with SiteBuilder Extensions website, place the same GA4 tracking code on your external site that you put in the Site Builder site setup record. Since the external site is a third-party site, how you add the tracking code on your website depends on how and where your third-party site is hosted. You need to place the tracking code on your site before the closing </head> tag.
Many content management systems offer an addition to head option for this purpose. Ideally, addition to head is at the site level, so the tracking code is automatically placed to every page. Sometimes, , addition to head is at the page level, so you'll need to place the tracking code on all pages.