Setting up Google Analytics 4

Before you can use Google Analytics 4, you must configure the Google API Console and .

Prerequisites

You must have a account.

Note: These steps are provided for you to set up a Google Analytics 4 property alongside your existing Universal Analytics property.

Configurations for the Google API Console

Complete the following steps to configure the Google API console:
  1. Log into the Google Developers Console.
  2. Select the required project.
  3. Search for and add the Google Analytics Data API to the project and Enable.

Configurations for Google Analytics 4

Complete the following steps to configure Google Analytics 4:
  1. Log into .
  2. Create a 4 new property.
  3. Select the relevant information about your site and click Create.
  4. Go to Property User Management and add the Service account email.
  5. Create a Data Stream.
  6. Add a Stream name and for the Website URL, enter the URL for the associated store.
  7. Note the Measurement ID for the property. The Measurement ID is required to send store data to .
  8. Go to Configuration > Custom Definitions.
  9. Click Create custom dimensions.
  10. 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

  11. Go to Configuration > Custom Definitions.
  12. Click Create custom metrics.
  13. 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
  14. 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.