Executing doPlugins code conditionally based on s.t() vs s.tl() | Community
Skip to main content
Andrew_Wathen_
New Participant
June 17, 2015
Archived

Executing doPlugins code conditionally based on s.t() vs s.tl()

  • June 17, 2015
  • 2 replies
  • 2051 views

Within the "doPlugins" section of the analytics code we often want to conditionally execute code depending on the context in which doPlugins is called i.e. either in the context of a Page View s.t() or in the context of an interaction s.tl().

 

We've managed to put in place some work arounds to make this happen.  However it would be great it you could introduce an officially supported way of doing this as it would increase the flexibility/usability of the solution - it could be as simple as setting some kind of flag

2 replies

jantzen_b
Employee
October 27, 2020
No text available
New Participant
July 1, 2015

If you are using AppMeasurement library, you can use s.linkType to determine if it is an s.tl call and whether it is o,d, or e type.  If s.linkType is not set, then it is an s.t call. 

 

If you are using Legacy H.XX version, you can look for s.lnk or s.eo (check for both; one or both of them may be set, depending on how old your core lib is).  

 

If this isn't relevant to what you are looking for, can you please clarify?