Issue with .tl() Adobe function | Community
Skip to main content
Level 2
June 27, 2025
Solved

Issue with .tl() Adobe function

  • June 27, 2025
  • 4 replies
  • 568 views

Field DescriptionWhat product are you using?What area of the product are you using?What are you trying to achieve?What’s the problem or error?What have you tried so far?Environment / VersionScreenshots / Videos / Logs / Code

Adobe Analytics
 

 

 I’m reaching out regarding a somewhat technical issue we’ve encountered.
We are sending an Adobe event via the AB Tasty tool using the .tl() function. The goal is to identify pages where we have an ongoing A/B test on the website. Below is the configuration of this hit:

 

ensureOmnitureIsSet(timeout).then(function() {  
    const abAffectation = '[{{campaignId}}][{{variationId}}]';  
    window.s_c_il[0].eVar74 = 'ab' + abAffectation;  
    window.s_c_il[0].tl();  
});  
 
Recently, we noticed that this hit no longer sends an event hit but instead sends a pageview hit. This behavior is problematic for us, as it impacts how we use Adobe data in Workspace.
Has there been any recent update regarding the usage of this function, which is supposed to send an event hit?
Additionally, do you have any recommendations to ensure that this function sends an event hit instead of a pageview?
 
 
 
 
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Jennifer_Dungan

The s.t() and s.tl() functions definitely haven't changed.. but your implementation of them looks non-standard:

 

ensureOmnitureIsSet(timeout).then(function() {  
    const abAffectation = '[{{campaignId}}][{{variationId}}]';  
    window.s_c_il[0].eVar74 = 'ab' + abAffectation;  
    window.s_c_il[0].tl();  
});  

 

If your s object is globally accessible, then you should be able to call the tracking with standard code...

 

As @pradnya_balvir mentioned, using s.tl(this, 'o', 'linkName');


On top of that however, you are setting additional dimensions, which also need to be set and told to be included in your action hit...

 

Something like:

const abAffectation = '[{{campaignId}}][{{variationId}}]'; s.eVar74 = 'ab' + abAffectation; s.linkTrackVars = "eVar74"; s.tl(this, 'o', 'ongoing ab test');

 

 

However, I have another question for you... if you are trying to track that there is an ongoing AB Test on your page, why aren't you stitching that data into your actual page view call, and reducing server calls? I understand that timing dependencies can be difficult, but tracking the information as part of the page is a much stronger correlation (and it reduces your server calls and potential overall costs)

4 replies

pradnya_balvir
Community Advisor
Community Advisor
June 27, 2025

Hi @rim ,

 

You're using:

 

window.s_c_il[0].tl();

 

But instead of firing an event call (non-pageview), it's sending a pageview hit (s.t() call). This is not expected, since s.tl() should only send a custom link/event hit (like for downloads, outbound links, etc.).

 

What s.tl() Needs to Work Properly

The function s.tl() requires three parameters:

s.tl(this, 'o', 'linkName');

Where:

  • this = the object that triggered the call (often just use this or null)
  • 'o' = link type:
    • 'o' = custom
    • 'd' = download
    • 'e' = exit
  • 'linkName' = a string label (e.g., 'AB Test Trigger')

If you omit these parameters (like in your current code), Adobe Analytics may fall back to pageview logic (s.t()), or ignore the call.

Vinay_Chauhan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
June 27, 2025

Hi @rim 

To make sure '.tl()' sends an event hit (and not a pageview), you need to include all three required parameters. Right now, it’s being called without them, which can cause it to default to a pageview call.


You can update your code like this -

ensureOmnitureIsSet(timeout).then(function() {
const abAffectation = '[{{campaignId}}][{{variationId}}]';
var s = window.s_c_il[0];
s.eVar74 = 'ab' + abAffectation;
s.tl(null, 'o', 'RIM Test Trigger');
});

This tells Adobe to send a custom event hit instead of a pageview.
The three parameters are:

  • null: placeholder for the link object

  • 'o': for custom link

  • 'RIM Test Trigger': just a label to help identify the event

This should fix the issue.

Hope that helps!

 

Jennifer_Dungan
Community Advisor and Adobe Champion
Jennifer_DunganCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
June 27, 2025

The s.t() and s.tl() functions definitely haven't changed.. but your implementation of them looks non-standard:

 

ensureOmnitureIsSet(timeout).then(function() {  
    const abAffectation = '[{{campaignId}}][{{variationId}}]';  
    window.s_c_il[0].eVar74 = 'ab' + abAffectation;  
    window.s_c_il[0].tl();  
});  

 

If your s object is globally accessible, then you should be able to call the tracking with standard code...

 

As @pradnya_balvir mentioned, using s.tl(this, 'o', 'linkName');


On top of that however, you are setting additional dimensions, which also need to be set and told to be included in your action hit...

 

Something like:

const abAffectation = '[{{campaignId}}][{{variationId}}]'; s.eVar74 = 'ab' + abAffectation; s.linkTrackVars = "eVar74"; s.tl(this, 'o', 'ongoing ab test');

 

 

However, I have another question for you... if you are trying to track that there is an ongoing AB Test on your page, why aren't you stitching that data into your actual page view call, and reducing server calls? I understand that timing dependencies can be difficult, but tracking the information as part of the page is a much stronger correlation (and it reduces your server calls and potential overall costs)

bjoern__koth
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
June 28, 2025

as @jennifer_dungan mentioned, you will have to list eVar74 in the linkTrackVars to be sent with your request.

 

window.s_c_il[0].linkTrackVars += ",eVar74"

 

should do the trick

Cheers from Switzerland!