The Adobe Analytics extension has a dedicated location to set a link tracking call.

  1. Log in to Adobe Experience Platform Data Collection using your AdobeID credentials.
  2. Click the desired tag property.
  3. Go to the Rules tab, then click the desired rule (or create a rule).
  4. Under Actions, click the desired action or click the ‘+’ icon to add an action.
  5. Set the Extension drop-down list to Adobe Analytics, and the Action Type to Send Beacon.
  6. Click the s.tl() radio button.

You cannot set any optional arguments in the Analytics extension.

s.tl() method in AppMeasurement and the Analytics extension custom code editor

Call the s.tl() method when you want to send a tracking call to Adobe.

s.tl([Link object],[Link type],[Link name],[Override variable]);

The link object argument determines if the browser waits up to 500ms before navigating away from the page. If an image request is sent sooner than 500ms, the page immediately navigates to the clicked link.

NOTE
AppMeasurement automatically enables the useBeacon variable for exit links, making this argument no longer needed in modern browsers. This argument was used more commonly in previous versions of AppMeasurement.
  • this: Wait up to 500ms to give AppMeasurement time to send an image request. Default value.
  • true: Do not wait.
// Include a 500ms delay with an exit link
s.tl(this,"e","Example exit link");

// Do not include a 500ms delay with an exit link
s.tl(true,"e","Example exit link");

The link type argument is a single-character string that determines the type of link tracking call. There are three valid values.

// Send a custom link
s.tl(true,"o","Example custom link");

// Send a download link
s.tl(true,"d","Example download link");

// Send an exit link
s.tl(true,"e","Example exit link");

The link name argument is a string that determines the link tracking dimension item. When using the Custom link, Download link, or Exit link dimensions in reporting, this string contains the dimension item. If this argument is not set, the linkURL variable is used.

// When using the Download link dimension, this method call increases the occurrences metric for "Sea turtle PDF report" by 1.
s.tl(true,"d","Sea turtle PDF report");

Variable overrides (optional)

Lets you change variable values for a single call. See variable overrides for more information.

var y = new Object();
y.eVar1 = "Override value";
y.linkTrackVars = "eVar1";
s.tl(true,"o","Example custom link",y);

Examples and use cases

Send a basic link tracking call directly inside an HTML link:

<a href="example.html" onClick="s.tl(true,'o','Example link');">Click here</a>

Use JavaScript to make a basic link tracking call using method arguments:

s.tl(true,"o","Example link");