The variables set in the Analytics extension's Global Variables seem to not fire on all rules/rule types (see Global Variables - Direct Call Rule ). This is similar to how it was in DTM.
It would be great if we had some control over this (maybe give me the ability to say "fire for all beacons" or "fire for all s.t beacons" or "fire immediately before any beacon, but after other rules" or something), or by default they DID fire anywhere the Analytics Extension was in a rule. Otherwise, folks still have to resort to using doPlugins, or setting up a rule for global variables that somehow fires on all other AA rules/beacons.
Thanks for posting this idea. I have added this request to our analytics roadmap.
As a followup, I just retested this.... and it is still a problem. It doesn't seem to make a difference whether the "subsequent" beacons are s.t() or s.tl()... my global variables only get set on my initial rule.
would it be an option to "move" ALL s.tl() calls to the rule setup? would mean instead of doing all the config stuff in the analytics extension, the extension provides both a trigger for download-clicks/exit clicks which could be used similar to custom link tracking. that would allow to setup the rule just as we do with all the other rules ....
I've achieved this by stacking rules, and pushing all analytics track events down through a single direct call which has a number of different rules listening, in a specific order. Some rules are conditional, some aren't - so this way, I can control certain variables that apply to everything, and certain variables that are conditional. The last rule fires the beacon. Maybe not ideal, but it works well for us.
This also allows us to reference analytics variables in a specific order: for example, we set hierarchy variables based on s.pagename (with some modification), if I do this in the extension I cannot control the order in which it is evaluated and therefore I end up with incorrect variable settings, but by doing this in stacked rules I can easily control the order of evaluation and ensure the result is correct. Even if we had the ability to choose when the global variables are evaluated (s.t vs s.tl / etc), it would not address my requirement to control the order of evaluation as that would be unique to my implementation and each property.
I can see this working and is a good solution in the current set up, but I still definitely would like a way to do it without having to make sure my "global" rule gets triggered for ALL rules/beacons.
even if I move all s.tl beacons to rules, this is still an issue.... my global variables don't fire on my s.tl rule-based beacons either.
I do have the same issues on custom event calls. Solved it by a helper function, which sets all global variables on events. I once define the global variables in this function, and then call it in the AA Set Variables component (on every rule) in custom code and works perfectly. But yes, this should be handled without custom code.
FYI I've never encountered this problem since using Launch in October 2019.
All of my AA hits include my global variables, including s.tl() hits.
Intriguing, thanks for letting me know! I'll have to test and see if this has, in fact, been resolved!
the question is if you need a "clearVariables" at the end of all rules? otherwise I think it will keep the old variables/events and messing up tracking (eg. you set a specific event on s.t() and it will appear on the subsequent s.tl() call...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.