Integrate with Google Analytics

This content is for clients that have never integrated their Google Analytics setup with Monetate and use Google tag (gtag.js).

If you have never integrated your Google Analytics setup with Monetate and you use Google Tag Manager, then follow the instructions in Integrate with Google Analytics When Using Google Tag Manager.

If you've previously integrated an earlier version of Google Analytics with Monetate and now need to update that integration after creating a Google Analytics 4 property, then follow the instructions in Migrate Existing Google Analytics Integration to Google Analytics 4 and Set Up a Google Analytics 4 Integration Using Google Tag.

Follow these steps to set up an integration with Google Analytics.

  1. Click the settings icon in the top navigation bar and then select Integration.

    Callout of the Integration option in the settings menu

  2. On the Third-Party Analytics tab, take one of the following actions:
    • If the account doesn't have any third-party analytics custom reports, then click SELECT for Google Analytics.

      Callout of the SELECT button for the 'Google Analytics' option

    • If the account already has a third-party analytics report, then click ADD REPORT and select Google Analytics.

      Callout of the 'Google Analytics' option in the ADD REPORT button menu

  3. Optionally, set Enable by default for all new experiences to YES if you want Monetate to push experience data for all new experiences to Google Analytics.

    Enabling this setting does not enable Google Analytics reporting for existing Web experiences. You must add the new report to each existing experience. See Enabling Google Analytics at the Experience Level for more information.

    Callout of the 'Enable by default for all new experiences' toggle

  4. Optionally, preview the code pushed to Google Analytics by clicking SHOW THE CODE BEING USED TO REPORT DATA.

    You cannot modify the default code. If the default code is not suitable for your Google Analytics setup, then you must either create a custom report that uses one of the code samples for a Google Analytics 4 integration in Set Up a Google Analytics 4 Integration Using Google Tag, or you must request a more customized code for your integration from Monetate. If you require the latter, then submit a request using the Monetate Technical Support portal (support.monetate.com).

    The default code for the Google Analytics integration works with Google Analytics 4 and its Google tag, gtag.js, as well as with Google Universal Analytics (analytics.js), which stopped processing data on July 1, 2023, and Google Classic Analytics (ga.js), deprecated in 2016.

    Callout of the 'SHOW THE CODE BEING USED TO REPORT DATA' button

  5. Click CREATE.

    Callout of the CREATE button

Monetate pushes experience data to Google Analytics after the initial page load and then every 5 minutes thereafter. Refer to Google's Realtime report documentation to learn more about viewing Monetate experience data in your Google Analytics setup.

Testing the New Report

You can ensure the new report works from the report configuration page.

Follow these steps to test the new report.

  1. Click the preview icon on the Google Analytics configuration page.

    Callout of the preview icon for a Google Analytics report configuration

  2. While viewing the new browser tab or window in which your site loaded in Preview Mode, launch Monetate Inspector and then click the Components tab.

    A retail site, with a message that states, 'PREVIEWING:  Google Analytics' below the active portion of the browser window. The Monetate Inspector tool appears at the top, with a callout of the chemistry beaker icon that represents the Components tab

  3. Ensure that reporting labels are submitted. The reporting labels appear in the sr2 or Submit Reporting Events row of the Actions table.

    Callout of the 'Google Analytics 4' message resulting from the 'console.log()' method used in the GA4 report's code

After you test the report, you can set Enable by default for all new experiences to YES if you opted not to do so when you first created the report.

If you opt to set Enable by default for all new experiences to YES, you must also add the new report to each active Web experience that you want reported to your Google Analytics setup. See Enabling Google Analytics at the Experience Level for more information.

Enabling Google Analytics at the Experience Level

Follow these steps to enable Google Analytics reporting for an individual active Web experience.

  1. Navigate to the experience that you want reported to Google Analytics, and then open it in Experience Editor.
  2. Click the additional options menu (...) on the Experience Editor page, and then click Third-Party Analytics.

    Callout of the 'Third-Party Analytics' option in the additional options menu on the Experience Editor page

  3. Toggle Google Analytics to YES.

    Callout of the Google Analytics toggle on the Third-Party Analytics modal

  4. If you want to see a specific string for this experience in all third-party analytics platforms enabled for it, enter it into Report Label.

    The text in Report Label auto-populates with the name of the experience. Monetate reports this string to the integrated third-party platform(s). Monetate also automatically creates labels for holdout variants based on your specified variant labels. For each variant included in the holdout, Monetate appends the label with - Holdout.

    callout of the Report Label field on the Third-Party Analytics modal

  5. Click SAVE.

    Callout of the SAVE button on the Third-Party Analytics modal

You can view a table of experiences that Monetate is reporting to Google Analytics on the Google Analytics Configuration screen of the Third-Party Analytics tab of the Integration page of the Monetate platform settings.

Callout of the 'View Associated Experiences' section of the Google Analytics integration configuration

To disable Google Analytics reporting for a single experience, click its name in this table to open it in Experience Editor, then click the additional options menu (...), click Third-Party Analytics, and then toggle Google Analytics to NO in the Third-Party Analytics modal.