Comment

Avatar

Community Advisor

20-05-2021

FWIW, this question came up again and I just retested, and it really is problematic as it is. Take a look at https://digitaldatatactics.com/test/testGlobalVars.html, which walks through the problems, which essentially boils down to:

  1. Global Variables only evaluate once, on page view, which is bad if you use clearVars, and particularly bad on a single page app.
  2. Global Variables don't get added to linkTrackVars and won't appear in any s.tl beacons.

I have plenty of workarounds, all of which basically come down to "don't count on Global Variables". Which means for something that I want on EVERY beacon, I either set it in doPlugins (making sure it's added to linkTrackVars), or I make sure every beacon has at least one rule that sets eVar15, potentially making either one rule with dozens of triggers, or dozens of rules that all set eVar15.