Expand my Community achievements bar.

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

Avatar

Community Advisor

6/16/15

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 Comments

Avatar

Level 9

7/1/15

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?