Reference > Analytics for IBM WebSphere Commerce > Analytics tag library for IBM WebSphere Commerce


Content URL tag

The content URL tag collects information about e-mail-based marketing campaign activities and sends the information to an external analytics system.

The data generated by the tag includes:

WebSphere Commerce provides an abstract base tag implementation class for the content URL tag:

ContentBaseTag

This base tag class collects information about an e-mail activity. Analytics vendors who want to provide a content URL tag in their Web analytics JSP tag library for WebSphere Commerce can extend this base tag class to get the e-mail activity data and implement their own logic to generate the vendor-specific content URL tagging APIs.


Parameters

The content URL tag takes the following parameters:

url

A required parameter that is a string representation of a URL, or a variable created using the <c:url> tag to be modified.

id

A required parameter that identifies the variable name in which to place the modified URL.

spotname

A required parameter that defines the content spot name as a string.

contentname

This variable is used to override the name of the content. If supplied, it is used instead of the default value obtained by a lookup.

scope

An optional parameter that specifies the scope in which the variable of the modified URL applies. Valid values are:

1

(Default) The variable applies to this page. The variable might be different the next time the page is loaded.

2

The variable applies to this request. The variable might be different the next time the content spot is requested, even for the same page.

3

The variable applies to the current session. The variable might be different the next time the customer browses the site.

4

The variable applies to the current application, and will not change.


Content URL tag for Coremetrics

WebSphere Commerce provides a default implementation of the content URL tag for Coremetrics. This tag must be included in all content spots included in e-mail activities. It appends content-related information to an URL to track content spot click-throughs and stores the result in the ID object. If this tag is used in storefront JSP pages, no data is forwarded to Coremetrics.

To use this tag, you must include the tag library in the JSP page. The tag library must be referenced prior to the main page content. Use the following tag so that the JSP page refers to the tag library:

<%@ taglib uri="http://commerce.ibm.com/coremetrics" prefix="cm" %>


Examples

To track e-mail activities that have a content spot embedded in the e-mail template, add code similar to the following to the content spot JSP file:

<cm:contenturl url="${ClickInfoURL}"
spotname="${param.spotName}" 
      contentname="${ContentObj.name}" id="ClickInfoURL" /


XML definition

<tag>  
<name>contenturl</name>  
<tag-class>com.ibm.commerce.bi.taglib.coremetrics.ContentURLTag</tag-class>  
<body-content>empty</body-content>  
<description>Appends content-related information to an URL to track content spot clickthroughs and stores 
               the result in the "ID" object.</description> 
 
<attribute>    
<name>url</name>    
<required>true</required>    
<rtexprvalue>true</rtexprvalue>    
<description>String of an URL, or a variable created using the
<c:url> tag that will be modified.</description>  
</attribute>  
<attribute>    
<name>spotname</name>    
<required>true</required> 
   
<rtexprvalue>true</rtexprvalue>    
<description>String of an
contentspotname</description>  
</attribute>  
<attribute>    
<name>contentname</name>    
<required>true</required>    
<rtexprvalue>true</rtexprvalue>    
<description>String of content name</description>  
</attribute>  
<attribute>    
<name>id</name>    
<required>true</required>    
<rtexprvalue>false</rtexprvalue>    
<description>The variable name that the modified URL will be placed in.</description>  
</attribute>  
<attribute>    
<name>scope</name>    
<required>false</required>    
<rtexprvalue>true</rtexprvalue>    
<description>The scope in which the variable of the modified URL will be placed. Valid values are:       1 - The variable applies to this page. The variable may be different the next time the page is loaded.
      2 - The variable applies to this request. The variable may be different the next time the 
          content spot is requested, even for the same page.
      3 - The variable applies to the current session. The variable may be different the next time the 
          customer browses the site.
      4 - The variable applies to the current application, and will not change.
   
</description>  
</attribute>
</tag> 

Related reference

Page view tag

Order tag

Shop cart tag

Product tag

Registration tag

Campaign URL tag

Generic tag


+

Search Tips   |   Advanced Search