Install basic Google Analytics

  • Updated

Optimizely Configured Commerce business users have the option to install either basic Google Analytics or a Google Tag Manager container on their various websites and domains. The steps to install Google Analytics are shown below.

Locate Google Analytics ID

Using the basic Google Analytics implementation will allow you to provide a unique Google Analytics property ID (often referred to as a "UA ID") and the domains in which you want that tracker installed, and Configured Commerce will place the Google Analytics Universal Analytics tracking snippet with your provided UA ID in the correct location across all pages on your site. If you are having trouble locating your UA ID, see the Google Support article located here. This is typically the easiest way to implement Google Analytics tracking.

Make note of the UA ID you wish to use for tracking, as we will need to enter it in the next step.

Update the Google Tracking Settings

There are three settings responsible for the configuration of Google Analytics:

Name Value
Google Tracked Domains Comma-separated list of all the domains this website is hosted on that you'd like this tracker on
Google Tracking Account ID Either the UA ID of the Google Analytics tracker you'd like to install, or the GTM ID of the Google Tag Manager Container you'd like to install
Google Tracking Type 'GoogleAnalytics',  'GoogleTagManager' or 'Google Analytics 4' depending on which tracker you have decided on using (see Google_TrackingId above)
  1. To update these settings, go to the Admin Console > Administration > System > Settings.
  2. In the Search Box, enter "google track". The three settings will display.

  3. Notice that the System Settings finger tab is highlighted, showing that the three settings are located within this section.

  4. Click the System Settings finger tab.
  5. Under the Analytics section, all three Google Analytics settings are displayed. (If desired, click the green x in the search box to clear the yellow highlighting).

    IMPORTANT: Be sure to select the correct target for which the settings will be applied:Global (all sites) or a specific website.
  6. If any websites already have a unique setting that is not the Global Default, this icon will be displayed.

    Selecting Global Defaults and updating settings will not override any unique website focused settings.

  7. Update the setting fields: choose the Tracking Type, identify the Tracked Domains (click Add More to add additional domains), and enter your Tracking Account ID.

Optional: Site Search Tracking

Optionally, you may also choose to enable Site Search Tracking in Google Analytics. Site Search Tracking lets you understand visitor engagement metrics regarding the search box on your site. Metrics such as percentage of sessions with search, all keywords that have been searched and more are captured with this setting enabled.

To enable this, go to View Settings in the Google Analytics view you are using on your Configured Commerce website. Scroll to the bottom of the page, use the slider to turn on the Site search Tracking option, and enter "criteria" without any quotes as the Query parameter. Be sure to Save your changes.

Example of the Google Analytics Site Search Tracking Reports:

Related topics