Search code examples
javascriptadobe-analytics

Calling s.tl() doesn't populate s.events


We have just added SuperTag to a website and have observed one event is suddenly not populating the s.events value.

This code is executed on a button click.

var s = s_gi(s_account);
s.linkTrackVars = 'eVar39,prop39,prop45,eVar45,events';
s.linkTrackEvents = 'event49';
s.events = 'event49';
s.prop39 = s.eVar39 = 'mobile:NZ:specialists:call';
s.prop45 = s.eVar45 = 'john citizen';
s.tl(this, 'o', 'Button');

However when you inspect the request you can clearly see its missing the s.events property. (NOTE: I've blurred out live information to protect identities and origin)

Missing s.events

What could cause this issue?


Solution

  • The code you've provided looks OK. I'd be willing to bet that somewhere in your s_doPlugins function, s.linkTrackEvents is being cleared (or events is being removed from s.linkTrackVars for whatever reason). At the end of your s_doPlugins block, add:

    console.log(s.linkTrackVars, s.linkTrackEvents);
    

    and see what that shows.