Executing doPlugins code conditionally based on s.t() vs s.tl() | Community
Skip to main content
Andrew_Wathen_
New Participant
Jun 17, 2015 2:52 AM UTC
Archived

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

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
Oct 27, 2020 11:42 PM UTC
No text available
Translate
Level 8
Jul 1, 2015 6:27 PM UTC

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?

Translate