The IBM Tealeaf UI Capture library consists of a single JavaScript file. You place this JavaScript file with the other static files served by your site.

References to the JavaScript file

To track activity on a web page, you add a reference to the required UI Capture JavaScript file.

Every served page that requires client event tracking must have <script> tags in it to load the IBM Tealeaf UI Capture JavaScript:

<script src="/Tealeaf.js" type="text/JavaScript"></script>

If you place the UI Capture JavaScript in a place other than the root directory on your web server, adjust the src= parameter in the reference to point to the correct location.

IBM Tealeaf target page

The IBM Tealeaf target page is a URL to which the UI Capture JavaScript is configured to send POST requests for capture by the IBM Tealeaf system. You place this dynamic page with the other dynamic page files for your web application.

How the target page is used

The dynamic target web page must be posted or created to receive the information posted by the JavaScript, such as TealeafTarget.php, TealeafTarget.jsp, TealeafTarget.asp, or similar.

The target page exists only to acknowledge the post. No data is saved.

The web server returns a minimal valid response, such as the following message.

<html><head></head><body>Received 895 bytes in 0.1 ms</body></html>

Sample target pages

Sample targets for ASPX, JSP, and PHP environments are provided with the UI Capture distribution.

You can modify the target page for your specific target environment. You can use these sample targets as the basis for creating target pages suitable for other environments.

Target page requirements

A Tealeaf target page (TealeafTarget) must be added to your web server infrastructure in a location that the UI Capture JavaScript can access. For simplicity, you can place the dynamic page in the root directory. Your website administrator can provide you with the policies and procedures for your installation.

The Tealeaf target page ensures the proper capture of UI events, and must have the following properties:

  • The page must be POSTable.
  • The page must be dynamically executable, for example, ASPX, PHP, or JSP.
  • The page must not be cached by Akamai or any cache service, device, or mechanism.

Target page modifications for DOM Capture

The target page is configured by default to read in up to 20,000 bytes. DOM Capture deployments have varying POST sizes, depending on the size and frequency of the DOM snapshots. You update the target page to account for the increased POST data.

Use the TLT_MAX_REQ_LENGTH field in the target page to a value that reflects the typical POST data size from the UI Capture SDK in your deployment. This setting ensures the correct capture of the UI Hits by the CX PCA.

Target page installation

The target page must be added to your web infrastructure in a location that can be accessed from the visitor's web browser. For simplicity, you can place these files in the root directory or in a central JavaScript directory.

Your website administrator can provide you with the policies and procedures for your installation.

In your web application's pages, references to the target page must be relative to the site root path. For www.example.com, to reference an IBM Tealeaf target page at www.example.com/scripts/TealeafTarget.aspx, you configure the IBM Tealeaf UI Capture to /scripts/TealeafTarget.aspx. The initial / makes it a site-root relative path.

Deployment guidelines

Refer to these guidelines when you deploy the IBM Tealeaf target page.

Typically, the IBM Tealeaf target page is deployed independently of the core application itself in logical and physical terms. Review these guidelines with your infrastructure staff.

  • Avoid deploying the IBM Tealeaf target page behind enterprise security features, such as SiteMinder.
  • If possible, deploy the IBM Tealeaf target page on a separate application server instance from the web application. While it is a lightweight deployment, it can compete for resources with the web application. If possible, deploy it on a dedicated application server instance.
  • Test the IBM Tealeaf target page thoroughly in a test environment before deployment to production.

References to the target page

In your web application's pages, references to the IBM Tealeaf target page must be relative to the site root path.

For www.example.com, to reference an IBM Tealeaf target page at www.example.com/scripts/TealeafTarget.aspx, you configure the UI Capture library to POST to /scripts/TealeafTarget.aspx. The initial "/" makes it a site-root relative path.

In the UI Capture JavaScript, the URL of the target page is configured as part of the initial implementation.

Unit tests of the target page

To test that the target page is operating properly, you can run the following tests.

  • GET: Enter the URL of the target page in your browser. If you receive a blank page or non-404 error, the page is properly handling your request.
  • POST: You can use Fiddler or another traffic monitoring tool to generate a post to the page. Verify that the POST action resulted in a Status Code 200 message.


Join The Discussion

Your email address will not be published. Required fields are marked *