Click Tracking

To track a link, the link is stored in a link table with a link name as described above.  On the live report, the link displays the number of clicks to the given link. 

The following diagram illustrates the flow for tracking a link to an internal form.

Tracking can be achieved by the means described below.

Explicit external link tracking

To explicitly track a link, you can add the following code to your personalization template:

<a href=”${clickthrough(‘google search‘, ’extensiontable.favoritesport’)}”>Search for your favorite sport</a>

This will produce a link to the click processor with the given link name encoded.  The click processor tracks the click. After a click is processed, the user is redirected to the forms processor or to the final external link. In our example, the external link will be reached.

In this case, the link would have been coded as:

Link name: google search
Link URL: www.google.com?q=${extensiontable.favoritesport}

Note that the field name in the clickthrough method is passed as a string scalar.  Two things happen when this is done:

  1. The clickthrough method knows that the value of the field extensiontable.favoritesport needs to be obtained.

  2. The URL to the click processor that will be created sends the value of the field with the retrieved value.

Alternately, you can code the clickthrough method invocation with the actual value of the field, in the same way as in the form method invocation described above. Consider the following example:

<a href=”${clickthrough(‘google search‘, ’FAVORITE_SPORT=basketball’)}”>Search for basketball</a>

In this case the field name is passed, plus an equals sign, plus the actual value. This method avoids the retrieval of data from the user’s record, but preserves the semantics of sending the field name as before. The field name can be any valid string, including alias names. The click processor uses the given name to retrieve the information.

Explicit internal form tracking

The following example illustrates how to track clicks to a form:

<a href=”${clickthrough(‘user info‘, ’profile.firstname‘, ’profile.lastname’)}

and the form link could be set up as:

Link name: user info
Link URL: ${form(‘user preferences‘,‘profile.firstname‘, ’profile.lastname’)}

Explicit link tracking with parameter analysis

In this mode, the links are coded with the clickthrough method as before, but with only one parameter, the link name.

When the system encounters the clickthrough method, it opens the link table, obtains the URL, and determines the needed parameters from that link URL.

Consider the following example:

Link name: google search
Link URL: www.google.com?q=${extensiontable.favoritesport}

and the following anchor in the HTML template:

<a href=”${clickthrough(‘google search’)}”>Search</a>

Notice that the Link URL requires extensiontable.favoritesport, which is sent from the clickthrough method call.  By analyzing the link URL, the clickthrough method will recognize that it needs to send this value.

You can specify parameters in LINK_URL using one of the following formats:

${datasourcealias.fieldalias}
Using this format, the proper data for datasourcealias.fieldalias will be sent. You can use this format with either the form or clickthrough method.

form(‘formname’, ‘datasourcealias.fieldalias’, …)
You can use this format only  with the form method.
Not that with this format, you must enclose the field reference in single quotes (‘).

Implicit link tracking

You can also code click tracking without using the clickthrough method. This is done so that the parameters sent by clickthrough and the destination link match automatically.

In this way of tracking, the personalization processing examines the links inside the anchor tags and tries to match the href with any link URL. The search is done character by character, matching only identical strings. When the personalization phase detects a match in this fashion, it internally creates an implicit clickthrough method call. For example, if the personalization template is:

<a href=”www.google.com?q=${extensiontable.favoritesport}”>Search for your favorite sport</a>

and the link table is:

Link name: google search
Link URL: www.google.com?q=${extensiontable.favoritesport}

RPL will internally code a clickthrough method call that will ensure that the required parameters are sent (in this case, the extensiontable.favoritesport field).  It is important to note that the form method in the template will not be executed since it is replaced by the clickthrough method.  The form will be computed only after the click is received.

Notice that in the above example, the URL in the anchor and the link URL are identical.

This method works only with anchors. If the links are coded in a different fashion, for instance with javascript, then the manual explicit clickthrough method is required.

Implicit link tracking can be used with the form method as a link URL and the anchor’s href. The URL and href must be identical. In this case, the form method will be replaced with a clickthrough equivalent, and the form method will not be executed during personalization of the message.

In the implicit link tracking, you must use single quotes. Since the href in the anchor starts with a double quote, its end will be determined by the first double quote after it. If the form method is coded as part of implicit click tracking, and the form method has double quotes, the anchor end will be improperly recognized.

The following example is incorrect because of improper use of double quotes:

Link name: user preferences
Link URL: ${form("user preferences)}

If the above example is used with the following code in the template:

<a href=”${form(“user preferences”)}”>User preferences</a>

Both the link URL and the href appear to be identical. However, for implicit tracking the href is assumed to be:

${form(

This is because the first double quotes inside of the form method will terminate the anchor. As a result, the form will not be implicitly tracked.

Using tracking parameters

Sometimes it is not enough to use link tables, the clickthrough method, or the form method. In some complex cases, you might want to perform advanced operations on your own web page, with an eventual call to Oracle Responsys. One such example is the use of advanced unsubscribe forms hosted at an external web site.

Consider the following example:

You need to create a more complex form for subscriptions in a custom web server. That form will update internal customer records in the customer’s database. For reporting purposes, Oracle Responsys must be notified of any final unsubscribes so that a campaign report shows the actual number of unsubscribes with the campain.

In this case, it is important to let the Oracle Responsys server know of a unsubscribe action associated with a campaign so that live reports and other reports attribute that unsubscribe action to the campaign, as illustrated in the following diagram:

Step 4 is performed from the unsubscribe web page when the unsubscribe action is confirmed. In order to notify Oracle Responsys about an unsubscribe action, a pair of parameters, called _ri_ and _ei_, are required in the web call. These parameters should be present in the call of step 4 in the diagram. To use these parameters, both parameters should come from the campaign launch, into the email, then into the unsubscribe form, and finally to Oracle Responsys unsubscribe endpoint.

To create the _ri_ and _ei_ parameters, you use the tracking method. This method returns the two parameters together as a single string that can be concatenated with other string parameters of a URL. It follows the proper format for URL formation.

Consider the following code:

<a href="http://www.example.com/unsubscribe?clientid=${CUSTOMER_ID_}
&tracking(campaign.name)}">Manage Your Subscriptions</a>

This code can result in a link with the following content:

<a href="http://www.example.com/unsubscribe?clientid=1587932&_ri_=X0Gzc2X%3DWQrnHjFHQGmiM4zghSE9SX5lfzaAFJCysuksIfVXyjLNpLOfhKLX%3DtHmjpLxILllLjQgLlVXMtX%3DWQrnHjFHQGjzgJty3zdwgS5O2guP3S4DfnLUbn&_ei_=EmKw7b8wc39AGbHzXbi74rGgqemwVKioX14uG1dUmC7rqFJzl6gjzORDrl6kNnVNY5xF3vZEy464L1JwOHe06UA_0Rg-_kshjTchpfTNpojsuBpN">Manage Your Subscriptions</a>

In this example, the tracking method produced the _ri_ and _ei_ parameters that are sent to the unsubscribe form in www.example.com

You must now provide the form with a way to call Oracle Responsys on an unsubscribe. This can be achieved by multiple link calling mechanisms in HTML, including anchor tabs, forms, or javascript. More often, the call is embedded in an image tag on the unsubscribe confirmation page as follows:

<img height="1" width="1" SRC="http://rsp.rsys2.net/pub/optout/UnsubscribeOneStepConfirmAction? _ri_= X0Gzc2X%3DS%3ANkHzfLgH%3ASRWR%3AAWRS%3AAWRD%3ATCRU%3ASBAR%3AG%3AvVXMtX%3DS%3ANkHzfLgH%3ASRWR%3AAWRS%3AAWRW%3ATCRS%3ASBAR%3Azg%3AaVXyjLNpLOfhKLX%3DHIJKxjLkihgkPkQJhu&_ei_=&YES=Remove%20Me">

Note that the URL is composed of four sections:

  1. The unsubscribe URL. This URL is provided to you as part of the account. In this case, we are using http://rsp.rsys2.net as an example. Please refer to your documentation to obtain this address.

  2. The unsubscribe sub-address, given as /pub/optout/UnsubscribeOneStepConfirmAction?

  3. The _ri_ and _ei_ paratemers, as sent in the email

  4. The required &YES=Remove%20Me that is part of the parameters needed by the unsubscribe URL. This is always the same.

For more information, see the tracking method.

Next steps

Internal form processing