You are here:
Configure Google Analytics™ for Experience Cloud Sites
Set up Google Analytics to track user IDs, user types, and search activity so this information can be pulled into meaningful reports.
Required Editions
| Available in: both Salesforce Classic and Lightning Experience |
| Available in: Enterprise, Performance, Unlimited, and Developer Editions |
| User Permissions Needed | |
|---|---|
| To customize or publish an Experience Cloud site: |
|
Google Analytics integrates with your self-service site to track user types, user IDs, page views on Salesforce objects, and customer search activity. To capture this information correctly, some initial setup is required.
- In Experience Builder, go to Settings | Security. Under Content Security Policy, choose Allow Inline Scripts and Script Access to Whitelisted Third-party Hosts.
-
Go to Settings | Advanced and enter your Google Analytics ID.
For more information about the Google Analytics ID, check the Google Analytics documentation.
-
Select Let Google Analytics access your Salesforce data for deeper insights
into search activity.
This step lets Google Analytics track user types, user IDs, and customer search activity in your site.
-
To enable the masking of IP addresses on the Google server side, select Use
IP Anonymization.
Masking IP addresses helps with privacy compliance and concerns.
-
Create custom dimensions in your Google Analytics account that capture user type and
Salesforce object information.
- From your Google Analytics account, go to Admin | Property | Custom Definitions | Custom Dimensions, and click +New Custom Dimension.
- For the first index you want to use, enter the name User Type and select Hit for the scope.
-
For the second index, enter the name Salesforce Object and
select Hit for the scope.
Note The Google Analytics console auto assigns sequential indexes based on how many variables you created. Configure the custom dimension indexes in the site so that they match the indexes of the newly created variables.
-
Create a User-ID view.
With the User-ID view, you can analyze how specific segments of traffic with an assigned ID engage with your content.
- Go to Admin | Property | Tracking Info | User-ID and follow the instructions.
- For the User-ID view, enter the name User Explorer.
- To track the way different types of users are interacting with the site, click Reporting | Audience | User Explorer | User Flow.
After you integrate Google Analytics, you can install the preconfigured Google Analytics for Salesforce Communities package or create your own reports.
Did this article solve your issue?
Let us know so we can improve!

