Using the conversion event tag with IBM Digital Analytics
If your site is integrated with IBM Digital Analytics, formerly known
as Coremetrics Analytics,
you 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
<cm:conversion />
tag
in the page that loads when a customer triggers the specific conversion
event. For example:- You might have a Subscribe button on a
store page that customers can click to subscribe to a newsletter.
To track this conversion event, place the
<cm:conversion />
tag in the page that loads when the customer clicks the button. - To track customers that add items to a wish list, place the
<cm:conversion />
tag in the page that loads immediately after the user adds an item to the wish list.
You must also include the tag library in the JSP file before the main page content by using the following code:
<%@ taglib uri="http://commerce.ibm.com/coremetrics" prefix="cm" %>
Example of tag usage and output for IBM Digital Data Exchange (DDX)
If your 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: digitalData = { pageInstanceID:'wcs-standardpage_wcs-productdetail',
event:[{eventInfo:{eventName: 'AddToWishlist',
eventAction: '2', eventPoints: '10'}, category:{primaryCategory: 'WISHLIST'},
attributes:{exploreAttributes: '', extraFields: ''}}]}
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:cmCreateConversionEventTag(eventID, actionType, eventCategoryId, points, attributes, extraFields)
Example 1:
To pass basic conversion event data to IBM Digital Analytics:
Include tag in your store page with the following code: |
|
Example of IBM Digital Analytics data tag generated: |
|
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: |
|
Example of IBM Digital Analytics data tag generated: |
|
For details about each parameter in the IBM Digital Analytics data tag, see the documentation that is provided by IBM Digital Analytics.