Reports & Dashboards

With B2C Commerce Reports & Dashboards, you can identify trends over time and make smarter business decisions based on your B2C Commerce data. View data on order conversion metrics, site traffic, frequently searched products, and more. This guide explains how to configure and verify Reports & Dashboards to use with your Progressive Web App (PWA) Kit site.

To use Reports & Dashboards:

  • Open a support case asking Salesforce Customer Support to enable Einstein Activities. If you're migrating from an existing Storefront Reference Architecture (SFRA) site (phased rollout or otherwise), you should time this step to coincide with your Composable Storefront launch to preserve your existing SFRA reporting.
  • Have the Reports and Dashboards user role in Account Manager with the scopes of the permission set to the environments in your realm. If you don’t have this role, ask your Account Manager administrator to assign it to you. See Managing Account Manager for Salesforce B2C Commerce Users.

Unless otherwise stated, all of the points in this guide apply to sites built 100% with Composable Storefront (PWA Kit) or with a phased headless rollout.

After completing the prerequisites, configure Reports & Dashboards by following these steps.

Phased headless rollout only: Complete the steps in Einstein Activities for Phased Headless Rollouts.

In your PWA Kit project, go to template-retail-react-app/config/default.js and set the properties as follows.

  • host: Almost always set to the Einstein production instance api.cquotient.com. If you want to use a proxy, you can set this property to a value such as /mobify/proxy/einstein. See No Data in Reports & Dashboards after Correct Setup.

  • einsteinId: Your Einstein API key that you received when you configured Business Manager.

  • siteId: Use the format realm-siteId. For example, zzrf-RefArch.

  • isProduction: Set this property to true if the data is from a production MRT environment. Data appears in Reports & Dashboards only if isProduction is set to true. Set this to false if the data isn’t from a production Managed Runtime (MRT) environment. For example, if you’re working in a development environment.

Replace placeholders in this example with actual values. Placeholders are formatted like this: $PLACEHOLDER.

After you complete the configuration, data appears in Reports & Dashboards in 24 hours. After that, any new data appears in Reports & Dashboards 24 hours after any corresponding event happens.

Install the Commerce Cloud Recommendation Validator Chrome addon to see the activity events that a page sends out.

Alternatively, you can check the network requests in your browser and filter for api.cquotient.com requests.

After completing the prerequisites and configuration, verify your data in Reports & Dashboards. We recommend that you verify your order numbers.

  1. Log into Business Manager.
  2. Go to Merchant tools > Analytics > Reports & Dashboards.
  3. Confirm that order numbers on the Home and Sales tabs are what you expect based on the activity on your site.
  4. Go to Traffic > Shopper Journey.
  5. Confirm that the Visits With Orders number is what you expect based on the activity on your site. For more granular analysis, you can filter the report by a specific date or date range. See Set the Dashboard Date Range.

Associated screenshot

This section provides suggested solutions for common errors that you can encounter while using Reports & Dashboards.

Potential Cause: You configured Reports & Dashboards less than 24 hours ago.

Suggested Solution: Wait at least 24 hours after completing the configuration before you check your Reports & Dashboards.

Potential Cause: The prerequisites weren’t met or Reports & Dashboards configuration is incorrect.

Suggested Solution: View Einstein Activity API Calls for your site by using the Network tab in DevTools. Optionally, you can also install the Commerce Cloud Recommendation Validator Chrome addon. These fields appear in the Commerce Cloud Recommendation Validator.

  • Realm: If this field is empty, Reports & Dashboards doesn’t know which realm the data comes from. Ensure that your user role in Account Manager has the scopes of the permission set to the environments in your realm. Confirm that you have the Reports and Dashboards user role in Account Manager with the scopes of the permission set to the environments in your realm. See the Prerequisites.
  • instanceType: If this field isn’t set to prd, your data doesn't appear. Set the isProduction property to true so that instanceType is set to prd. See Configure Reports & Dashboards.

Potential Cause: Adblockers stop requests to the Einstein Activities API.

Suggested Solution:

  1. Set up a proxy in Runtime Admin as described in Configure Managed Runtime Environments.

    • Use the path mobify/proxy/einstein.
    • Direct all Einstein requests through that proxy by adding the Einstein API host as api.cquotient.com.
  2. Setting up a proxy can prevent data from appearing in Reports & Dashboards. That’s because all user agent request strings will appear in Reports & Dashboards as robots (and not as real shoppers), since the proxy replaces the User-Agent header with Amazon Cloudfront. To avoid this issue, update the Einstein API code in your PWA Kit project to send clientUserAgent = navigator.usserAgent in the Einstein request.

    In your project, go to /template-retail-react-app/app/hooks/use-einstein.js and add this code.

Setting up a proxy can slow down your site performance.