What are possible reasons why ClearVariable fails?

Avatar

Avatar

thomas_amsler

Avatar

thomas_amsler

thomas_amsler

21-02-2019

We are currently mainly using direct call rules for our tracking. Even the page view itself is a direct call rule, as we had the pageBottom fire when it shouldn't (SPA not finished initializing). All our rules follow the same pattern in the action section: 1-n Set Variables, Send Beacon, Clear Variables.

One of these Set Variables actions is responsible to set s.products and s.events only on product detail pages, to track its view (prodView and a custom event). I now have the strange behaviour that these are not cleared at the end: The product detail page has multiple tabs which we only track minimalistic with the title of the tab, a custom event for tab click and some standard variables which are tracked in a doPlugin method. But the first tab I click also contains s.products and s.events values from the page view rule fired before. The second and any other on page rule are fine and do not contain them, as if the Clear Variables from the tab click rule worked and the one from the page view didn't. Is there any way to debug the Clear Variable action to see if it really isn't executed?

I debugged the tab click rule and there s.products is still populated the first time the rule gets fired.

EDIT: Could there be some issues, if this tab click rule wasn't modified for a while, but we now use a newer version of the Analytics Extension? Do you have to "touch" every single rule if you update one of the extensions that are used within the rule?

Answers (33)

Answers (33)

Avatar

Avatar

thomas_amsler

Avatar

thomas_amsler

thomas_amsler

25-02-2019

Good to know that I am not the only one and someone else confirmes the issue. Updated my ticket, so they are aware that there is another ticket around with the same issue.

Avatar

Avatar

thomas_amsler

Avatar

thomas_amsler

thomas_amsler

25-02-2019

I only use the basic extensions for Analytics: Core, Context Hub, Experience Cloud ID Service, Analytics Extension.

Most Set Variables actions use custom code, but I don't see what could be an issue with that. This used to work until recently, so my guess is Analytics Extension 1.6 or AppMeasurement 2.11 respectively introduced a bug with s.t() so the variables aren't properly cleared. They still get cleared with s.tl() calls.

I also opened a ticket with support for this as we are nearing our next release on the weekend and this is now a major problem on our side.

Avatar

Avatar

gflare

Avatar

gflare

gflare

21-02-2019

How are your different rules and their corresponding action blocks set up?

I think the issue your seeing is stemming from something you hinted at in this quote, but I'm not sure without more info:

Where are you doing the logic to set s.products and s.events?  Are you using other extensions, , setvars custom code section, or custom code blocks?