Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

What are possible reasons why ClearVariable fails?

thomas_amsler
Level 9
Level 9

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?

1 Accepted Solution
josnyder
Correct answer by
Employee
Employee

I've seen problems with the ManageVars plugin where it overwrites the s.t function.  It looks like you are having this problem.  Check your doPlugin custom code to see if this is the case.

View solution in original post

34 Replies
gflare
Level 4
Level 4

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?

thomas_amsler
Level 9
Level 9

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.

thomas_amsler
Level 9
Level 9

I did some further testing and as we are hosting the scripts ourselfs, I was able to use the old AppMeasurement.js on our test environment. There I don't have the problem. So I can at least confirm that AppMeasurement 2.11.0 introduced a bug which wasn't there in 2.10.0

So for all others I recommend not to upgrade your Analytics Extension to 1.16.0 which includes AppMeasurement 2.11.0

miikkal3149476
Level 2
Level 2

We have ran into this same problem after updating to newest Analytics Extension, Clear Variables is not working as it should, and old events are sent in next analytics call, where they should already be cleared.

Please fix this asap, also have opened support ticket about this.

thomas_amsler
Level 9
Level 9

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.

thomas_amsler
Level 9
Level 9

I just found another strange behavior with AppMeasurement 2.11:

On the Shopping Cart Page two direct call rules are fired:

page-load: actual page-view with s.t()

cart-add: Cart addition with s.tl()

The problem is, both Rules overlap and do strange things with the tracking object:

s.products is only populated in cart-add, but I already see the product string in the page-load call. In cart-add s.products is then empty again.

here my Log from DTM Debugger (Who doesn't seem to know s.products):

VM805:1   Rule "DC: "page-load" - s.t()" fired.

VM805:1   [Adobe Analytics] Set variables on the tracker.

VM805:1   [Adobe Analytics] Applying the following properties on tracker: "{"eVar44":"","eVar67":"Inhaltsbereich","eVar75":"","eVar76":"","prop67":"D=v67","linkTrackVars":"eVar44,eVar67,eVar75,eVar76,prop67,campaign"}".

VM805:1   [Adobe Analytics] Set variables on the tracker.

VM805:1   [Adobe Analytics] Applying the following properties on tracker: "{"linkTrackVars":"eVar44,eVar67,eVar75,eVar76,prop67,campaign"}".

VM805:1   [Adobe Analytics] Set variables on the tracker.

VM805:1   [Adobe Analytics] Applying the following properties on tracker: "{"linkTrackVars":"eVar44,eVar67,eVar75,eVar76,prop67,campaign"}".

VM805:1   [Adobe Analytics] Set variables on the tracker.

VM805:1   [Adobe Analytics] Applying the following properties on tracker: "{"linkTrackVars":"eVar44,eVar67,eVar75,eVar76,prop67,campaign,eVar91"}".

VM805:1   [Adobe Analytics] Set variables on the tracker.

VM805:1   [Adobe Analytics] Applying the following properties on tracker: "{"linkTrackVars":"eVar44,eVar67,eVar75,eVar76,prop67,campaign,eVar91"}".

VM805:1   [Adobe Analytics] Set variables on the tracker.

VM805:1   [Adobe Analytics] Applying the following properties on tracker: "{"linkTrackVars":"eVar44,eVar67,eVar75,eVar76,prop67,campaign,eVar91"}".

VM805:1   [Adobe Analytics] Set variables on the tracker.

VM805:1   [Adobe Analytics] Applying the following properties on tracker: "{"linkTrackVars":"eVar44,eVar67,eVar75,eVar76,prop67,campaign,eVar91"}".

VM805:1   [Adobe Analytics] Set variables on the tracker.

VM805:1   [Adobe Analytics] Applying the following properties on tracker: "{"linkTrackVars":"eVar44,eVar67,eVar75,eVar76,prop67,campaign,eVar91"}".

VM805:1   [Adobe Analytics] Firing page view beacon.

VM805:1   [Adobe Analytics] Clear variables.

VM805:1   Rule "DC: "cart-interaction"" fired.

VM805:1   [Adobe Analytics] Set variables on the tracker.

VM805:1   [Adobe Analytics] Applying the following properties on tracker: "{"linkTrackVars":"eVar44,eVar67,eVar75,eVar76,prop67,campaign,eVar91"}".

VM805:1   [Adobe Analytics] Firing link track beacon using the values: {"linkType":"o","linkName":"Cart Interaction"}.

VM805:1   [Adobe Analytics] Clear variables.

sfabri
Level 2
Level 2

Got the same problem too. Searched for hours, I'm glad to hear I'm not the only one (though it problematic 🙂 )

thomas_amsler
Level 9
Level 9

@all

Please provide support with reproducible cases. Our test environments aren't accessible from outside, so they struggle with my ticket. But if you guys have accessible test environments where support can try to reproduce the issue, it would help them fix it.

sfabri
Level 2
Level 2

Opened an incident with client care : [Incident: 190311-000076] if that can help.

We have not found a solution yet.

miikkal3149476
Level 2
Level 2

Hi, Yeah I also gave demo session to customer support, but haven't got any solution or information yet. They just said they try to reproduce it in their environment. Us like many others don't have open test environment for outsiders to access.

sfabri
Level 2
Level 2

Hi guys,
If Support/customer care do not have access to your tests environement it can still test it in Production with a tool to replace the Prod DTM or Launch script with Dev or Staging script.

This can be done with the Adobe Cloud debugger under the "tools" tab or with a chrome addon like Requestly.

miikkal3149476
Level 2
Level 2

Yeah, that is true, but then we'd need to know when they do this. As we do some changes and tweaks in dev all the time, so we can't have this issue there all the time.

Our current "fix" for this is, that we have clear variables both start and the end of the tracking. But that's not a long term solution as then we cannot use global variables on these rules.

sfabri
Level 2
Level 2

miikkal3149476 That is exactly the solution the customer care suggested to me this morning
Answered the same as you, something in the realm of : "It fixes the event issues but unfortunately half my variables are gone and the s.product as well. We cannot use this ".

Jennifer_Kunz
Community Advisor
Community Advisor

It sounds like this is actually a defect (with the analytics extension), based on discussions with the product folks- something to do with the timing on pageBottom if you are using the Experience Cloud ID service. I believe it's been communicated to the folks in charge of that extension so hopefully there will be a fix before long.

settytb1
Employee
Employee

Hi all,

We are investigating the issue in relation to the latest version of the Analytics Launch extension. 

Thanks,

Seth

thomas_amsler
Level 9
Level 9

I've got an update from support:

Quick update from Engineering. They mentioned that they have a fix in place and they should be able to push it to users within the next couple of weeks once they have tested it. I will updated you once the fix is pushed. Thank you for your patience in the meantime.

thomas_amsler
Level 9
Level 9

I just got an update from support, they claim that the latest version of the Analytics Extension (v1.7.4) should contain the fix for this issue. The included AppMeasurement is now on version 1.12.

EDIT:

My first impression was good, but now it seems the problem persists on my side. And one thing else seems to have broken. Each click on the webpage fires a tracking call, even though there isn't any rule involved. I get back to support.

thebenrobb
Employee
Employee

Quick summary of the issue: AppMeasurement 2.13 was released last week which addressed the clearVars() issue - I actually don't know how far back that issue has existed, but it was for sure in 2.12 and presumably 2.11 and previous versions as well.  It was made available within DTM as AppMeasurement 2.13 and was contained within the Analytics Launch extension version 1.7.3.

Unfortunately, AppMeasurement 2.13 contained a different bug affecting ECID.  When that bug was discovered, we decided the quickest fix was to roll AppMeasurement back to 2.12.  This had the impact taking care of the ECID issue, but reintroducing the clearVars issue.

This rolled back version (2.12) that has no ECID issue, but does have a clearVars() issue is available with the Launch Analytics extension version 1.7.4 (and within DTM as AppMeasurement 2.13.1).

The Analytics team is working on an updated version of AppMeasurement that fixes the clearVars() issue and does not break ECID.  We expect that to be available in the coming weeks.

thomas_amsler
Level 9
Level 9

Thank you very much for the clear explanation. Though it will be too late for our next release, because it leaves us not enough time to retest everything. Looking forward to 2.14, which is then hopefully the next stable version without either of the two major bugs.

What I can say, 2.10 works for us as expected, only since 2.11 did we have problems and are thus staying with 2.10 until we can then test the next version thoroughly.

Jennifer_Kunz
Community Advisor
Community Advisor

Do we know at what point this issue started? In what version of the Analytics Extension?