Use the conversion event tag with IBM Digital Analytics

If the site is integrated with IBM Digital Analytics, we can use the default implementation of the <cm:conversion /> tag that WebSphere Commerce provides. The <cm:conversion /> tag generates the following IBM Digital Analytics tag: cmCreateConversionEventTag.


Tag placement in store pages

A conversion event might be a customer that is subscribing to a newsletter or adding an item to a wish list. Include the <cm:conversion /> tag in the page that loads when a customer triggers the specific conversion event. For example:

This tag is not necessary on JSP fragments or other included file assets.

We must also include the tag library in the JSP file before the main page content using the following code:


Example of tag usage and output for IBM Digital Data Exchange (DDX)

If the WebSphere Commerce store is integrated with DDX to simplify collecting analytics data, the <cm:conversion /> tag generates data into the digitalData JavaScript object that is sent to DDX. DDX can then relay the data to IBM Digital Analytics. The generated data that in this JavaScript object can look like the following output:

For more information about integrating with DDX, see IBM Digital Data Exchange integration.


Examples of tag usage

The <cm:conversion /> tag generates the following IBM Digital Analytics data tag:

Example 1:

To pass basic conversion event data to IBM Digital Analytics:

Include tag in your
store page with the following code:

    <cm:conversion eventId="AddToWishlist" category="WISHLIST" actionType="2" points="10"/>

Example of IBM Digital Analytics
data tag generated:

    cmCreateConversionEventTag ("AddToWishlist", "2", "WISHLIST", "10")

Example 2:

To pass Explore attributes along with the conversion event tag to IBM Digital Analytics, use the extraparms parameter (first position):

Include tag in your
store page with the following code:

    <cm:conversion eventId="AddToWishlist" category="WISHLIST" actionType="2" points="10" 
    extraparms="attr1-_-attr2-_-attr3"/>.

Example of IBM Digital Analytics
data tag generated:

    cmCreateConversionEventTag ("AddToWishlist", "2", "WISHLIST", "10", 
    "attr1-_-attr2-_-attr3")

For details about each parameter in the IBM Digital Analytics data tag, see the documentation that is provided by IBM Digital Analytics.


Related concepts
Passing extra data to IBM Digital Analytics with the extraparms parameter
IBM Digital Analytics JavaScript library types: standard and custom
IBM Digital Analytics, formerly known as Coremetrics Analytics integration with Web 2.0 starter stores


Related reference
Conversion event tag