Setting up Google Analytics 4
Before you can use Google Analytics 4, you must configure the Google API Console and .
Prerequisites
Configurations for the Google API Console
- Log into the Google Developers Console.
- Select the required project.
- Search for and add the Google Analytics Data API to the project and Enable.
Configurations for Google Analytics 4
- Log into .
- Create a 4 new property.
- Select the relevant information about your site and click Create.
- Go to Property User Management and add the Service account email.
- Create a Data Stream.
- Add a Stream name and for the Website URL, enter the URL for the associated store.
- Note the Measurement ID for the property. The Measurement ID is required to send store data to .
- Go to .
- Click Create custom dimensions.
- Enter the following to create the
required dimensions.
-
Dimension Name: hclMarketplace
Scope: Event
Description: The associated marketplace that catalog entries are ordered from in the store.
Event Parameter: hclMarketplace
-
Dimension Name: hclMarketplaceSeller
Scope: Event
Description: Marketplace Seller (Organization)
Event Parameter: hclMarketplaceSeller
-
- Go to .
- Click Create custom metrics.
- Provide the following information to
create the required metrics.
- Metric name: search_results
- Description: The number of search results for a given search term
- Scope: Event
- Parameter name: search_results
- Unit of measurement: Standard
- The data stream created in Step 5 must be updated to track the search
term.
- From the list of data streams, edit the data stream created in Step 5.
- Go to Events. Click on the settings icon from the Enhanced Measurement section to configure the data stream.
- From the Enhanced
Measurement window, go to
Site Search and click on
Show advanced
settings.Note: Skip this step for the Ruby and Ruby B2B store.
- In the Search Term Query
Parameter box, add
searchTerm,in front of the list to allow the 4 to start tracking site search.Note: Skip this step for the Ruby and Ruby B2B store.