Digital Analytics integration with Web 2.0 starter stores

The HCL Commerce Web 2.0 starter stores use Rich Internet Application (RIA) technologies such as Ajax (Asynchronous JavaScript and XML) and Dojo widgets. With these technologies certain customer interactions with store page content do not result in a full page refresh. provides a framework to track these page interactions, in addition to interactions that result in a full-page refresh. This framework ensures that IBM Digital Analytics collects accurate analytics data about how customers are using your Web 2.0 store.

Integration with IBM Digital Analytics

The HCL Commerce Aurora B2C and B2B starter stores contain code in their JSP pages to track both full-page and page interactions.

How analytics data is captured in Web 2.0 stores

Web 2.0 starter stores capture analytics data differently depending on the type of customer interaction that is being tracked:
Interaction Description
Full-page interactions To track interactions that cause a full-page refresh, the store pages contain HCL Commerce analytics tags. These tags are placed at the bottom of each JSP page. When the full page refreshes, the HCL Commerce analytics tag generates a corresponding IBM Digital Analytics data tag that contains the analytics data to provide to the IBM Digital Analytics server. For example:
  • When a customer views any store page, the HCL Commerce <cm:pageview /> tag generates the IBM Digital Analytics cmCreatePageviewTag data tag to provide analytics data to the IBM Digital Analytics server about the page.
  • When a customer views the product details page, the HCL Commerce <cm:product /> tag generates the IBM Digital Analytics cmCreateProductviewTag data tag to provide analytics data to the IBM Digital Analytics server about the product.
page interactions

For IBM Digital Analytics integration, these interactions are called IBM Digital Analytics events.

To track the interactions that do not cause a full-page refresh, the store JSP pages contain business logic to communicate data about these events to IBM Digital Analytics. When the interaction occurs, the controller or widget for the page content generates an event. The IBM Digital Analytics event listener detects the event and gathers relevant analytics data about the event. Then, the IBM Digital Analytics event listener calls the corresponding IBM Digital Analytics JavaScript function to provide the analytics data to the IBM Digital Analytics server. For example:
  • When a customer drags an item to the mini shopping cart, the mini shopping cart widget generates both an IBM Digital Analytics page view event and anIBM Digital Analytics cart view event. The IBM Digital Analytics event listener detects these events and calls both the IBM Digital Analytics cmCreatePageviewTag function and the IBM Digital Analytics cmCreateShopAction5Tag function. These functions provide page view and shopping cart data to the IBM Digital Analytics server.
  • When a customer uses the Product Fast Finder to compare products, the Product Fast Finder widget generates a IBM Digital Analytics element event. The IBM Digital Analytics event listener detects the event and calls the IBM Digital Analytics cmCreateElementTag function to provide data about Product Fast Finder usage to the IBM Digital Analytics server.
    Note: The Product Fast Finder is not available if you enable search-based navigation with HCL Commerce search.

How page interactions are tracked in a Web 2.0 store

The following diagram shows the process for tracking page interactions and how the analytics data is communicated to IBM Digital Analytics:
page interactions
The tracking process unfolds like the following process:
  • 1 A customer interacts with page content that does not cause a full page refresh. For example, the customer interacts with the mini shopping cart, the Product Fast Finder, or a wish list. Each of these page interactions is a tracked analytics event, and the store page contains the business logic that is required to report on the event.
  • 2 The store page makes an Ajax get request. The request calls the HCL Commerce server to get a view that corresponds to the type of interaction, for example, the AnalyticsProductView or AnalyticsCartView. These views are defined in the struts configuration file for the site, and each view points to a corresponding view JSP file.
  • 3 The view JSP file retrieves the related analytics data from the HCL Commerce database and creates a JSON object that contains the data.
  • 4 The view JSP file returns the JSON object to the store page.
  • 5 The IBM Digital Analytics event listener detects the event and gathers the analytics data from the JSON object. The IBM Digital Analytics event listener then calls the corresponding IBM Digital Analytics tag function, for example, the cmCreateProductViewTag or cmCreateCartViewTag function. The tag functions send the analytics data to the IBM Digital Analytics server.

The subtopics in this section focus on understanding and customizing the framework that tracks page interactions. For more information about the HCL Commerce analytics tags, see Analytics tag library for HCL Commerce.