---
schema_version: "1"
id: 3091a4ec260cd53350a2530f319ca3359702854f3b97fa07e02d96ca14bca67e
title: Track User Engagement with Google Analytics 4
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/experience/264-0-0/networks_google_analytics_4.md
canonical_url: https://help.salesforce.com/s/articleView?id=experience.networks_google_analytics_4.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 705204e9e6f87d75a2add0abec52a8e467653cef26137b5c8b16fe66d177a68e
description: For insights into page visits and user engagement, add Google Analytics 4 to your enhanced LWR site from Experience Builder.
products:
  - Experiences
release: "264"
---
# Track User Engagement with Google Analytics 4

For insights into page visits and user engagement, add Google Analytics 4 to your enhanced LWR site from Experience Builder.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Salesforce Classic and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Applies to: <a href="https://help.salesforce.com/s/articleView?id=experience.exp_cloud_basics_glossary.htm&amp;type=5&amp;language=en_US" target="_blank">LWR sites</a></td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d122369e79">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d122369e79 ">To create an Experience Cloud site:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d122369e79 ">Create and Set Up Experiences AND View Setup and Configuration</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d122369e79 ">To customize or publish an Experience Cloud site:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d122369e79 ">
              <ul>
                <li>Create and Set Up Experiences AND View Setup and Configuration AND be a member
                  of the site<p>OR</p>
                </li>

                <li>View Setup and Configuration AND be a member of the site AND have appropriate
                  <a href="https://help.salesforce.com/s/articleView?id=experience.networks_access_control_overview.htm&amp;language=en_US" target="_blank">role-based site access</a>
                </li>

              </ul>
            </td>

          </tr>
        </tbody>
      </table>

If you don’t have a Google Analytics account, refer to the [GA4 documentation](https://support.google.com/analytics/answer/9304153) from Google to set one up. You must [create a GA4 property](https://support.google.com/analytics/answer/9304153?hl=en) with a Web data stream.

Google Analytics 4 allows users to track specific user interactions with page content. These interactions are called events. The out-of-the-box integration tracks certain events, including:

- Page views
- Scrolling
- File downloads
- Outbound clicks, which occur when a visitor selects a link that takes them to a separate domain.

If you want to track other events, you can develop your own using custom events. For more information about events, see [\[GA4\] Enhanced Measurement Events](https://support.google.com/analytics/answer/9216061?hl=en&utm_id=ad).

1. In Experience Builder, go to Settings and select Integrations.
2. For Google Analytics 4, click **Add to Site**.
3. Enter your Google Analytics [Measurement ID](https://support.google.com/analytics/answer/7372977?hl=en), and save the change.
4. Publish the site. Google Analytics begins tracking user engagement after you publish.

To stop Google Analytics from tracking user engagement, you can remove it from the site. Existing data for the site is still available in your Google Analytics account.

You can also change the Google Analytics Measurement ID. On the Integrations page, click **Edit** for Google Analytics 4, and enter a different Measurement ID. Then publish the site.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-experience-communities-264-0-0-production-enus/bf7df212-91a1-4fa3-a007-4d6f3e3b470b/images/icon_note.png)

Note

For testing purposes, you can publish the site from a sandbox or Developer Edition org. However, we recommend that you wait until you can deploy your site to production before you make it available to the public.