Documentation Center

Configuring tracking (JSP)

Views are tracked on the server as soon as the Content Variant is rendered and a conversion is registered when a user clicks on a link. You need to configure a Servlet (JSP) on a Java platform so that links are tracked and redirected.

Before you begin

The Components used in Content variants must contain one or more links to be able to track Conversions.

Procedure

  1. Go to your Web Application Server.
  2. In your Web site, create a redirects directory. For example /redirect/.
  3. Open the web.xml Web application descriptor file in a text editor.
  4. Add the following XML fragment:
    !-- SmartTarget Experiment Tracking -->
        <servlet>
            <servlet-name>SmartTarget Experiment Tracking</servlet-name>
            <servlet-class>com.tridion.smarttarget.analytics.tracking.TrackingRedirect</servlet-class>
        </servlet>
    
        <servlet-mapping>
            <servlet-name>SmartTarget Experiment Tracking</servlet-name>
            <url-pattern>/redirect/*</url-pattern>
        </servlet-mapping>   
  5. Save and close web.xml.

What to do next

If your Web site redirects directory is not /redirect/, open the smarttarget_conf.xml configuration file and configure the trackingRedirectUrl in the <Analytics> element.