HCL Commerce Version 9.1.4.0 or later

Setting up Universal Analytics

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

Prerequisites

You must have a Google Analytics account.

Configurations for the Google API Console

Complete the following steps to configure the Google API console:
  1. Log into the Google Developers Console.
  2. Create a new project by adding the Project Name and Location.
  3. Search for and add the Google Analytics API to the project and Enable.
  4. Go to Quotas.
  5. Set the Limit for Queries per minute to 1200.
  6. Set the Limit for Queries per 100 second to 2000.
  7. HCL Commerce Version 9.1.4.0Go to CredentialsCreate Credentials and set up the OAuth Client ID credentials.
  8. HCL Commerce Version 9.1.4.0Configure the OAuth Consent Screen and select the User Type as External.
  9. HCL Commerce Version 9.1.4.0Add information for the following OAuth Consent Screen fields. Do not add any scopes.
    • App name
    • User support email
    • Developer contact email address
  10. HCL Commerce Version 9.1.4.0Set the Application type as Web Application and provide a Name.
  11. HCL Commerce Version 9.1.4.0Note the OAuth Client ID and Client Secret.
  12. Create a service account by providing the following information. Do not add the information for any optional fields.
    • Service account name
    • Service account description

    A Service account ID is generated. Note the ID.

  13. Note the Service account email.
  14. Add a new Key for the service account. In the Create private key section, select Key Type as JSON. Download the JSON file.

Configurations for Universal Analytics

Complete the following steps to configure Universal Analytics:
  1. Log into Google Analytics.
  2. Complete the Account Setup.
  3. Create a Google Analytics new property.
  4. Go to Show advanced options and select Create a Universal Analytics property only.
  5. Select the relevant information about your site and click Create.
  6. Note the Tracking ID for the property. The Tracking ID is required to send store data to Google Analytics.
  7. Click the gear icon to view Account, Property, and View information.
  8. Create a new Google Analytics view for Management Center.
  9. Go to View settings and note the View ID.
  10. For the Website's URL, enter the URL for the associated live store.
  11. Select the Time zone country or territory and the Currency display as.
  12. Define the Site Search Settings to track search keywords.
    • Set Site search Tracking as ON.
    • Add the Query parameter. For example, add searchTerm as the Query parameter.
    • Select the Strip query parameters out of URL option.
  13. Go to E-commerce Settings.
  14. Select Enable E-commerce and Enhanced E-commerce Reporting options.
  15. Optionally in Checkout Labeling, create the labels for checkout-funnel steps. For example, shipping, payment, review and so on.
  16. Grant the service account that you previously created in the Google API Console access to the view in Google Analytics.
  17. Go to View User Management, click the + icon and click Add Users.
  18. Add the Service account email and grant the Read & Analyse permission.
  19. Optionally set up filters on the view to include data only from the Production site in the reports.
  20. HCL Commerce Version 9.1.6.0 or laterGo to Admin > Property > Custom Definitions > Custom Dimensions to add custom dimensions for the Universal Analytics properties defined for the Emerald and Sapphire Reference Store applications.
  21. HCL Commerce Version 9.1.6.0 or laterClick NEW CUSTOM DIMENSION to create the following custom dimensions.
    Important: The custom dimensions must be created in the specified order and with the specified Index.
    1. Name: pageCategory

      Scope: Hit

      Index: 1

    2. Name: pageSubCategory

      Scope: Hit

      Index: 2

    3. Name: login

      Scope: Hit

      Index: 3

    4. Name: userID

      Scope: Hit

      Index: 4

    5. Name: searchTerm

      Scope: Hit

      Index: 5

    6. Name: productResults

      Scope: Hit

      Index: 6

    7. Name: onsiteSearch

      Scope: Hit

      Index: 7

    8. Name: listerResults

      Scope: Hit

      Index: 8

    9. HCL Commerce Version 9.1.12.0 or later

      Name: hclMarketplaceSeller

      Scope: Product

      Index: 9

    10. HCL Commerce Version 9.1.12.0 or later

      Name: hclMarketplace

      Scope: Hit

      Index: 10