Documentation Center

Tracking e-mail link clicking (VBScript)

When Outbound E-mail sends out an e-mail message, it may contain links to either a URL on a Web site, or to a Component.

These links follow the familiar <A HREF="resource">link text</A> format. In a Component link, the resource is a Content Manager URI, that is, a resource identifier beginning with the tcm: prefix. For example, <A HREF="tcm:42-666">Click here</A>. Outbound E-mail makes it possible to track which e-mail recipient clicked which links. This is done by replacing the actual link with a link to a special tracking Web page, which registers the click and then immediately redirects to the actual URL. To transform normal links into trackable links, either in a Format Area or anywhere else in a Component, use OutboundEmail.GetLinkTrackingUrl(). This function takes three parameters:

OutboundEmail.GetLinkTrackingURL(strHttpUrl, strUri, strTitle)

where

  • strHttpUrl is a URL to track (say http://www.example.com). If you are transforming a Component link, set this parameter to "".
  • strUri is a URI of a Component to track (say, "tcm:42-4711-2"). If you are transforming a URL, set this parameter to "".
  • strTitle (optional) is the title of the link, as the Statistics screen will display it. If you leave this parameter empty or leave it out altogether, the specified URL or URI is used as the title.