- Observe product performance metrics.
- Set automated rules for merchandising (for example, search result sorting).
Active Data works by collecting engagement data from shoppers browsing your site and interacting with products. This data is then aggregated into predefined dimensions that are stored and associated with each product in your catalog. That data can be viewed for analytics purposes or used to drive other site configurations in Business Manager.
To use Active Data:
- Build your site using PWA Kit version 3.3.0. If you have an earlier version, upgrade your project to use PWA Kit 3.3.0.
- If you haven't already done so, configure an
ocapiproxy that points to your B2C Commerce instance. To see the Active Data metrics or attributes in Business Manager, you must use a production instance. See Configure Managed Runtime Environments.
This table identifies the events in a PWA Kit site that Active Data tracks.
|PWA Kit Support
|Counts how many times a product is shown in minimal detail on a page. Examples include search results, recommendations, and banners.
|Counts how many times a product is shown in great detail on a page. Examples include product detail and comparison pages.
|Counts how many times a customer placed an order.
|Counts how many times an order contains at least one unit of a product that is marked as a gift. Implement a gift feature to take advantage of this functionality. To implement gifts, you must set the ProductLineItem object gift attribute to true. For an example, see the SiteGenesis singleshipping.xml templates.
After completing the prerequisites, install Active Data by following these steps:
export const ACTIVE_DATA_ENABLED = truein app/constants.js.
npm run buildto rebuild the PWA Kit bundle.
npm run pushto push the rebuilt bundle to Managed Runtime.
Data collected from events on your storefront is automatically associated with the relevant products and aggregated at various time durations. To confirm that this data is flowing correctly:
- Open your Product Catalog in Business Manager.
- Open a product.
- Click the Active Data tab to confirm that the traffic metrics shown below are incrementing based on the time durations.
If the metrics aren’t incrementing as expected, complete these debugging steps:
- Ensure that you've waited for 24 hours after a supported event happened.
- Inspect the network activity for the project and confirm that Active Data requests are returning a 200 status code. The URL for an Active Data request includes "_Analytics-Start".
If you completed the debugging steps and the metrics still aren’t incrementing, open a support case.
Note: Events from storefront interactions are collated nightly, so there’s latency between when events occur and when you see data appearing on the Active Data tab.
To configure sorting, in Business Manager, go to Merchant Tools > Sorting Rules. For more information, see Sorting Rules for B2C Commerce.
Currently, Active Data in PWA Kit is limited to product-based use cases. Active Data as a mechanism for customer group segmentation isn’t supported.