Expand my Community achievements bar.

Help shape the future of AI assistance by participating in this quick card sorting activity. Your input will help create a more effective system that better serves your needs and those of your colleagues.
SOLVED

s.clearvars function not working after new library update (16.4)

Avatar

Level 2

Hello,

It appears that after library update the following script which I set in the condition of multiple rules (because our platform is an SPA) is not working anymore. Is there a solution for this?

var s = _satellite.getToolsByType('sc')[0].getS();
s.clearVars();
return true;

Regards,

Guido

1 Accepted Solution

Avatar

Correct answer by
Level 2

Thanks for the quick response. I've send you a PM.

View solution in original post

4 Replies

Avatar

Level 10

Hi ,

We tried the same at our end and the below piece of code is working at our end with AppMeasurement library version 1.6.4.Please share your DTM account details in a mail (pamittal@adobe.com) or in a private message so that we can debug the issue at our end.

var s = _satellite.getToolsByType('sc')[0].getS();
s.clearVars();
return true;

Thanks & Regards

Parit Mittal

Avatar

Level 2

@Parmit

It seems that it has nothing to do with the new libary version. 

Our website is an SPA and we measure page loads by using event based rules. Each time afunctional page load takes place we generte a random ID in our dataLayer and we use this as a trigger for the page load rule. In this rule I use the above script. The script works fine, but not in the case I reload the page. Then I get the following error:

SATELLITE: Condition for rule "AA: page load" not met. Error: Cannot read property 'clearVars' of null

It seems this prevents the rule from firing. Can you please tell me what is going wrong?

Regards,

 

Guido

Avatar

Level 10

Hi ,

Please share your DTM account details & URL of the webiste in a mail (pamittal@adobe.com) or in a private message so that we can debug the issue at our end.

Thanks & Regards

Parit Mittal

Avatar

Correct answer by
Level 2

Thanks for the quick response. I've send you a PM.