Use the campaign tag with IBM Digital Analytics

If the site is integrated with IBM Digital Analytics, we can use the default implementation of the <cm:campurl /> tag that WebSphere Commerce provides. The campaign tag tracks impressions and clickthroughs for web and email marketing activities. Unlike other WebSphere Commerce provided tags, such as <cm:pageview /> and <cm:order />, the campaign tag does not generate a IBM Digital Analytics data tag. Instead, the campaign tag takes the URL of the web or email activity as input. The tag then modifies the URL by appending data about the activity to the URL by using specific IBM Digital Analytics tracking parameters. The modified URL is stored in the campaign tag's id parameter and used as the link to marketing content, making the data available to IBM Digital Analytics. The IBM Digital Analytics tracking parameters that the campaign tag appends to the modified URL are different, depending on the type of marketing activity:

The following example shows the original URL for an e-Marketing Spot, and the modified URL with the cm_cr parameter appended:


Tag placement in store pages

Include the <cm:campurl /> tag in all e-Marketing Spot JSP files, before the logic that displays the marketing content. The following example shows where to place the campaign tag in relation to the e-Marketing Spot code; the <cm:campurl /> tag is shown in bold text:

To setup the URL for the <cm:campurl /> tag for marketing content, refer to the following code snippet:

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


Examples of campaign tag usage

To send data about impressions and clickthroughs for web and email activities to IBM Digital Analytics:

Include tag in your
store page like this:
If the store uses data beans and URL commands for marketing runtime functions, use the databean parameter:

    <cm:campurl databean="${eMarketingSpot}" id="ClickInfoURL"
          url="${ClickInfoURL}" 
          initiative="${catEntry.initiativeId}"
          name="${catEntry.description.name}" />
    

If the store uses web services for marketing runtime functions, use the eSpotData parameter:

    <cm:campurl espotData="${marketingSpotData}" id="ClickInfoURL"
          url="${ClickInfoURL}" 
          initiative="${catEntry.initiativeId}"
          name="${catEntry.description.name}" />
    


Related concepts
IBM Digital Analytics JavaScript library types: standard and custom


Related reference
Campaign tag