Analytics tag library for HCL Commerce

The basis for the WebSphere Commerce analytics framework is a JSP-based tag library. By adding WebSphere Commerce analytics tags to the store pages, we can communicate information about site usage to an external analytics system.

The analytics tag library acts as an intermediary layer between WebSphere Commerce and the external analytics system. As customers interact with the site, the tag library generates vendor-specific JavaScript snippets that transfer information to the external server. This information includes the pages that are viewed, ads that display, and clickthrough.


Tag versions

WebSphere Commerce provides two versions of each analytics tag:

  1. A default implementation of the tag for . These WebSphere Commerce analytics tags start with the prefix <cm:, for example, <cm:pageview /> and <cm:cart />. These tags automatically generate related IBM Digital Analytics JavaScript snippets, called data tags. For example:

    • The <cm:pageview /> tag automatically generates this IBM Digital Analytics data tag: cmCreatePageViewTag

    • The <cm:cart /> tag automatically generates this IBM Digital Analytics data tag: cmCreateShopAction5Tag

  2. An abstract base tag implementation class, for analytics vendors other than IBM Digital Analytics.

    Analytics vendors can extend this base tag class to collect the analytical data and implement their own logic to generate the vendor-specific page view tagging APIs.


Tag library usage with IBM Digital Analytics

We can tag the store pages with the WebSphere Commerce analytics tags provided for IBM Digital Analytics, such as the <cm:pageview /> tag and the <cm:cart /> tag. The WebSphere Commerce analytics tags offer simpler alternative to adding the IBM Digital Analytics data tag JavaScript code to the store pages, which can be a cumbersome process. WebSphere Commerce also provides an auto tagging utility that automatically tags all store JSP pages with the <cm:pageview /> tag.


Tag library usage with analytics vendors other than IBM Digital Analytics

IBM Digital Analytics, like many other web analytics vendors, uses a JavaScript tagging mechanism. IBM Digital Analytics provides JavaScript code snippets for you to add to the store pages to collect analytical data for the external analytics system, as do other vendors, typically. Adding the JavaScript code snippets to the store pages can be a cumbersome process. As an alternative, we can use JSTL-based custom JSP tags that contain the logic to generate the JavaScript code snippets in the store pages. The JSTL-based tags are easier to add and maintain than the JavaScript tagging code. By extending the base tag class that WebSphere Commerce provides, we can create custom JSP tags to send the analytics data to the external analytics system. WebSphere Commerce also provides an auto tagging utility that automatically tags all store JSP pages with a page view tag.


See

  1. Page view tag

  2. Order tag

  3. Shopping cart tag

  4. Product tag

  5. Registration tag

  6. Campaign tag

  7. Conversion event tag

  8. Element tag

  9. Generic tag

  10. Passing extra data to IBM Digital Analytics with the extraparms parameter

  11. Syntax for passing JavaScript variables as extra parameters

  12. Comparison of extra parameters for IBM Digital Analytics tags


Related concepts
Integrating a store with IBM Digital Analytics for WebSphere Commerce
Integrating a store with an external analytics system (other than IBM Digital Analytics)


Related tasks
Tagging the store pages for IBM Digital Analytics