<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article Re: Don't use clearVars! in Adobe Analytics Blogs</title>
    <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/447446#M49</link>
    <description>&lt;P&gt;Great, Yes I thought that was the behaviour I was seeing.&lt;/P&gt;&lt;P&gt;For the Adobe team, can this not be looked at from the product side though to make those global variables impact each individual rule too, Otherwise there really isn't much point in them (and if anything they just create confusion).&lt;/P&gt;</description>
    <pubDate>Thu, 07 Apr 2022 14:52:40 GMT</pubDate>
    <dc:creator>chrish1471105</dc:creator>
    <dc:date>2022-04-07T14:52:40Z</dc:date>
    <item>
      <title>Don't use clearVars!</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/ba-p/410740</link>
      <description>&lt;P&gt;clearVars is a simple but very destructive function for clearing any variables that you have set to be tracked. This post provides a more elegant way to clear only those variables that you want that is far less destructive.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 03:35:57 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/ba-p/410740</guid>
      <dc:creator>yuhuisg</dc:creator>
      <dc:date>2022-08-02T03:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: Don't use clearVars!</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/410747#M12</link>
      <description>&lt;P&gt;This is nice post. I would definitely give it a try.&lt;BR /&gt;clearVars() always been a pain area for me too. However, I was wondering, if you have any variable that you would want to set again on next s.tl() call, you can define such variables in doPlugins() section.&lt;/P&gt;&lt;P&gt;Variables which you don't want to persist to linkcalls, can be set in Global Variable in Analytics extension and the variable which you would want there is linkcalls can be set in doPlugins() section. With that, even though clearVars() would clear all the globally set variables but variables like lang/site-section can be set in doPlugins() so next time when you have linkcall you would have those set again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have seen most people avoid extra lines of code &lt;img class="lia-deferred-image lia-image-emoji" src="https://experienceleaguecommunities.adobe.com/html/@31B4D6D7B3510763F3CBB2AAB7997408/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jun 2021 05:54:47 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/410747#M12</guid>
      <dc:creator>atulsingh17</dc:creator>
      <dc:date>2021-06-02T05:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: Don't use clearVars!</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/410754#M13</link>
      <description>&lt;P&gt;Thanks for sharing,&amp;nbsp;&lt;LI-USER uid="16551596"&gt;&lt;/LI-USER&gt;&amp;nbsp;!&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Variables which you don't want to persist to linkcalls, can be set in Global Variable in Analytics extension and the variable which you would want there is linkcalls can be set in doPlugins() section. With that, even though clearVars() would clear all the globally set variables but variables like lang/site-section can be set in doPlugins() so next time when you have linkcall you would have those set again.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That is precisely what I want to avoid: remembering to set the variables again somewhere else. That's why instead of the set-clear-reset method that you've described, I've opted to use a method that only clears specific variables, while leaving the others intact.&lt;/P&gt;
&lt;P&gt;Also, if I were implementing AA directly in code, then I would definitely go with your method of using doPlugins(). But with Adobe Experience Platform &lt;STRIKE&gt;Launch&lt;/STRIKE&gt; Data Collection, I prefer to rely on the Global Variables as much as possible.&lt;/P&gt;
&lt;P&gt;But there's definitely nothing wrong with your approach, and since you're comfortable with that, I'd recommend that you continue with it.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jun 2021 06:18:35 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/410754#M13</guid>
      <dc:creator>yuhuisg</dc:creator>
      <dc:date>2021-06-02T06:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Don't use clearVars!</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/410807#M14</link>
      <description>&lt;P&gt;&lt;LI-USER uid="17380119"&gt;&lt;/LI-USER&gt;&amp;nbsp;- really interesting insight into how you approach this.... and is very different to how I like to set up.&amp;nbsp; I think it is one of those situations where there are multiple approaches and there is no right or wrong approach.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just for the record in case any one is interested here is our approach...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have a Launch rule that always runs before everything else that both calls clearVars and sets linkTrackVars &amp;amp; linkTrackEvents to "none".&amp;nbsp; We do this deliberately to create a completely clean slate each time.&amp;nbsp; We then explicitly re-establish the adobe analytics variables that we want.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I like this approach because:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;we'll never accidently have anything bleeding over from one call to the next&lt;/LI&gt;&lt;LI&gt;by looking at the rules we have, it is absolutely clear what variables will be sent for a given scenario (easy for people to understand)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This works well for us, but appreciate your approach clearly works well for you too &lt;img class="lia-deferred-image lia-image-emoji" src="https://experienceleaguecommunities.adobe.com/html/@31B4D6D7B3510763F3CBB2AAB7997408/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 10:54:36 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/410807#M14</guid>
      <dc:creator>Andrew_Wathen_</dc:creator>
      <dc:date>2021-06-03T10:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Don't use clearVars!</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/410860#M16</link>
      <description>&lt;P&gt;Interesting approach.&amp;nbsp; I have some concerns with it as written though.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code block :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;  var setVariables = Object.keys(s).filter(function (k) {
    return /^((eVar|hier|prop)[0-9]+|products)$/.test(k);
  });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;This fails to include a handful of variables, ['channel', 'campaign', 'state', 'zip', 'pageType', 'purchaseID', 'transactionID', 'list1', 'list2', 'list3', ...maybe some others].&amp;nbsp; As it stands, these variables would not get cleared.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;The s object has a ton of keys on it.&amp;nbsp; It would me more code, but more performant to run some for loops to create the array that gets returned here.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I think that a better implementation for a clearVars function with exclusions would be to overwrite s.clearVars as such:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// This should be run at the top of AA Custom Code
s.clearVars = function() {
  var clearVarsExclusions = _satellite.getVar('clearVarsExclusions') || [];
  var clearVarsAdditions = _satellite.getVar('clearVarsAdditions') || [];

  var aaVars = [
    'chanel', 
    'events', 
    'products', 
    'purchaseID', 
    'transactionID', 
    'state', 
    'zip', 
    'campaign'].filter(function(variable){
      return (clearVarsExclusions.indexOf(variable) === -1);
    });
  var genVars = function(prefix, limit, exclusions){
    var variables = [];
    for (var i=1; i&amp;lt;=limit; i++) {
      var variable = prefix+i;
      (exclusions.indexOf(variable) === -1) &amp;amp;&amp;amp; variables.push(variable);
    }
    return variables;
  };
  
  aaVars.concat(
    clearVarsAdditions,
    genVars('prop', 75, clearVarsExclusions), 
    genVars('eVar', 250, clearVarsExclusions), 
    genVars('list', 3, clearVarsExclusions),
    genVars('hier', 250, clearVarsExclusions)
  ).forEach(function(variable){
    s[variable] = void 0;
  });
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Beyond being more performant, this allows the use of the AA Extension's Clear Variables action if desired.&amp;nbsp; If you would rather call s.clearVars from a postTrackCallback, this solution would support that as well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Oddly enough, the s.clearVars function in AppMeasurement.js does not clear s.pageName. The solution above allows the specification of an array of variables to include when clearing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I were to take this one step further, I would&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;put this code into an extension so that no changes would need to be made in AA custom code.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;also add a UI for management of the exclusion and addition lists.&lt;/LI&gt;&lt;LI&gt;add the option to call the function after every beacon (via register postTrackCallback).&lt;/LI&gt;&lt;LI&gt;possibly add some functionality for clearing context variables.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Just my $0.02&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jun 2021 16:53:17 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/410860#M16</guid>
      <dc:creator>Stewart_Schilling</dc:creator>
      <dc:date>2021-06-02T16:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: Don't use clearVars!</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/410940#M17</link>
      <description>&lt;P&gt;Thanks for the input,&amp;nbsp;&lt;LI-USER uid="10314630"&gt;&lt;/LI-USER&gt;&amp;nbsp;. I am personally not in favour of overwriting functions that have been specified in the library, because it introduces a new area of error if I or my successors forget about it.&lt;/P&gt;
&lt;P&gt;Also, I've corrected my regular expression in the post to accommodate more variable names. There could still be others that are left out, but it would be trivial for someone who wants to use this code to add them into the expression, if needed.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 07:08:05 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/410940#M17</guid>
      <dc:creator>yuhuisg</dc:creator>
      <dc:date>2021-06-03T07:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: Don't use clearVars!</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/417095#M18</link>
      <description>&lt;P&gt;I was dealing with exactly the same problem and used this solution and it worked beautifully. Thank you for sharing this.&amp;nbsp;&lt;LI-USER uid="17380119"&gt;&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 04:29:51 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/417095#M18</guid>
      <dc:creator>Vijaysarathy_Krishnan</dc:creator>
      <dc:date>2021-07-26T04:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: Don't use clearVars!</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/417792#M19</link>
      <description>&lt;P&gt;Thank you for the insight, helped me out.&lt;/P&gt;</description>
      <pubDate>Sat, 31 Jul 2021 22:32:29 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/417792#M19</guid>
      <dc:creator>David__Garcia</dc:creator>
      <dc:date>2021-07-31T22:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: Don't use clearVars!</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/418370#M22</link>
      <description>&lt;P&gt;Great post, thank you for sharing!&lt;/P&gt;&lt;P&gt;There is one use case where clearVars() is ideal, and that's in single-page applications when you genuinely want to clear everything so it doesn't bleed over into the next "page".&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 21:18:12 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/418370#M22</guid>
      <dc:creator>Gigazelle</dc:creator>
      <dc:date>2021-08-05T21:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: Don't use clearVars!</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/418684#M25</link>
      <description>&lt;P&gt;&lt;LI-USER uid="17380119"&gt;&lt;/LI-USER&gt;&amp;nbsp;Way to think outside the box! Awesome article.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-USER uid="7810177"&gt;&lt;/LI-USER&gt;&amp;nbsp; Can we get new "..&lt;SPAN&gt;clearVars is like a megaton nuclear bomb&amp;nbsp;..."&amp;nbsp;&lt;/SPAN&gt; t-shirts inspired by this article?&amp;nbsp;&lt;img class="lia-deferred-image lia-image-emoji" src="https://experienceleaguecommunities.adobe.com/html/@05C0D9C61C55A19E315F9F671AC49C5A/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 20:14:01 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/418684#M25</guid>
      <dc:creator>jantzen_b</dc:creator>
      <dc:date>2021-08-09T20:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: Don't use clearVars!</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/419152#M26</link>
      <description>&lt;P&gt;Great article &lt;LI-USER uid="17380119"&gt;&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 13:58:27 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/419152#M26</guid>
      <dc:creator>David_Jerome</dc:creator>
      <dc:date>2021-08-13T13:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: Don't use clearVars!</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/425443#M28</link>
      <description>&lt;P&gt;A really nice insights on clearVars.&amp;nbsp; I was struggling in one of the implementation with clearVars mainly on SPA application but this approach seems good.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;LI-USER uid="17380119"&gt;&lt;/LI-USER&gt;&amp;nbsp;&lt;A href="https://experienceleaguecommunities.adobe.com/t5/user/viewprofilepage/user-id/10314630" target="_blank"&gt;StewSchilling&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 09:06:25 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/425443#M28</guid>
      <dc:creator>Gokul_Agiwal</dc:creator>
      <dc:date>2021-09-29T09:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Don't use clearVars!</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/427368#M30</link>
      <description>&lt;P&gt;An interesting approach.&amp;nbsp; I've always relied on ClearVars at the start of each rule, and then global variables and some bits and bobs in the custom code in the extension, and never had a problem.&amp;nbsp; But this is an interesting alternative.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 10:41:22 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/427368#M30</guid>
      <dc:creator>Ben_Step</dc:creator>
      <dc:date>2021-10-13T10:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: Don't use clearVars!</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/431807#M32</link>
      <description>&lt;P&gt;Nice post! I'm thinking of how this could be brought into Launch or the Analytics extension in Launch so we don't need to custom-code it. Could we maybe use a Set Variables action with empty values instead?&amp;nbsp;&lt;img class="lia-deferred-image lia-image-emoji" src="https://experienceleaguecommunities.adobe.com/html/@437FA2E04D39878A29D0C13EE5098CB7/emoticons/1f914.png" alt=":thinking_face:" title=":thinking_face:" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 11:39:52 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/431807#M32</guid>
      <dc:creator>FrederikWerner</dc:creator>
      <dc:date>2021-11-18T11:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: Don't use clearVars!</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/437756#M33</link>
      <description>&lt;P&gt;Nice article&amp;nbsp;&lt;A href="https://experienceleaguecommunities.adobe.com/t5/user/viewprofilepage/user-id/17380119" target="_blank"&gt;@yuhuisg&lt;/A&gt;,&lt;/P&gt;
&lt;P data-unlink="true"&gt;We mostly used&amp;nbsp;&lt;A href="https://experienceleague.adobe.com/docs/analytics/implementation/vars/plugins/managevars.html?lang=en" target="_self"&gt;managevars&lt;/A&gt; for this&amp;nbsp;purpose. Can you help us to understand the difference here? From your viewpoint, which one is effective and accurate?&lt;/P&gt;
&lt;P data-unlink="true"&gt;Thanks much, Pratheep Arun Raj B&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jan 2022 12:03:24 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/437756#M33</guid>
      <dc:creator>PratheepArunRaj</dc:creator>
      <dc:date>2022-01-20T12:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: Don't use clearVars!</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/437761#M34</link>
      <description>&lt;P&gt;&lt;LI-USER uid="10666268"&gt;&lt;/LI-USER&gt;&amp;nbsp;, manageVars runs inside s.doPlugins, so it manipulates your variables&amp;nbsp;&lt;EM&gt;before&lt;/EM&gt; they are sent to AA.&lt;/P&gt;
&lt;P&gt;My recommendation in this article, on the other hand, is focussed on clearing out variables&amp;nbsp;&lt;EM&gt;after&lt;/EM&gt; the hit has been sent and before the next hit.&lt;/P&gt;
&lt;P&gt;I suppose you could use manageVars to clear out unneeded variables before the hit is sent, but it has to be done properly so you don't clear out wrong ones incorrectly.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jan 2022 13:24:07 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/437761#M34</guid>
      <dc:creator>yuhuisg</dc:creator>
      <dc:date>2022-01-20T13:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: Don't use clearVars!</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/445952#M42</link>
      <description>&lt;P&gt;I believe there is a functionality that allows you to do clean tracking without necessary having to use clearVars or custom code in callbacks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a feature in Adobe Analytics that is called variable Override:&amp;nbsp;&lt;A href="https://experienceleague.adobe.com/docs/analytics/implementation/js/overrides.html?lang=en" target="_blank"&gt;https://experienceleague.adobe.com/docs/analytics/implementation/js/overrides.html?lang=en&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can pass an object to the s.t and s.tl code which the configuration you want just in this call. Once the call is sent the s object does not inherit the value from the override object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So if you use:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var analyticsConfig = {
  pageName: "My test page name",
  eVar1: "New value 123",
  prop1: "ABC"
}

s.t(analyticsConfig)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You will see that you analytics call will contain only config from your&amp;nbsp;analyticsConfig object.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then check in the developer console and type s.pageName and notice you should see undefined, as the values from your override object did not update the s object. This is a much better solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As Adobe Launch support ES6 you can also configure a base object that will be merged to custom object so you are sure default variables to always be set on the call:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var base = {
    pageName: "abc",
    eVar3: "default"
}

var customConfig = {
    eVar1: "123",
    prop1: "abc"
}

s.t({
    ...base,
    ...customConfig
}); //use spread operator&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;So obviously we will create dataElements here to get base object and custom object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a better solution as you can make sure that your call will only contain the values you need and you do not need to worry to clean up after yourself.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 08:27:22 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/445952#M42</guid>
      <dc:creator>Alexis_Cazes_</dc:creator>
      <dc:date>2022-03-28T08:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: Don't use clearVars!</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/445961#M43</link>
      <description>&lt;P&gt;&lt;LI-USER uid="7375720"&gt;&lt;/LI-USER&gt;&amp;nbsp;thanks, that's a great solution!&lt;/P&gt;
&lt;P&gt;Unfortunately, it looks like the AA extension's "Send beacon" action in Adobe &lt;STRIKE&gt;Launch&lt;/STRIKE&gt; Experience Platform Data Collection Tags doesn't support this Override function. In that action's view, there is no field to let you specify the override object. What a pity!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 09:27:53 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/445961#M43</guid>
      <dc:creator>yuhuisg</dc:creator>
      <dc:date>2022-03-28T09:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: Don't use clearVars!</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/445974#M44</link>
      <description>&lt;P&gt;Interesting point let me see if we can update the extension.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 12:50:07 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/445974#M44</guid>
      <dc:creator>Alexis_Cazes_</dc:creator>
      <dc:date>2022-03-28T12:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: Don't use clearVars!</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/447114#M45</link>
      <description>&lt;P&gt;Interesting posts.&lt;/P&gt;&lt;P&gt;Looking for a definitive answer on is there a way to still get Global variables set if you run &lt;SPAN&gt;clearVars at the end of each rule for a 2nd rule running on the same page. My Assumption was the Global variables would be applied again in the 2nd rule as we've asked for these to be global but this doesn't seem to be the case and the variables are blank. We have mulltiple direct calls on the same page so I assumed we could use global variables to set the common evars but without sending multiple copies of the 1st event. If not why does it work this way and can the Adobe team not change how it works for rules to inherit global config.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 23:24:11 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-blogs/don-t-use-clearvars/bc-p/447114#M45</guid>
      <dc:creator>chrish1471105</dc:creator>
      <dc:date>2022-04-05T23:24:11Z</dc:date>
    </item>
  </channel>
</rss>

