I set an eVar through the Custom Script in DTM (in an Event based rule) like below:
s.eVar6 = this.getAttribute('data-name');
'ClickedELement' is a blank DataElement, I have to set this as without setting eVar6 through UI like this, eVar6 was not getting passed in Analytics call.
I am setting this as I have to set the value from the HTML element to keep the implementation general . There can be multiple such HTML elements each of which I am differentiating via "data-name" attribute present in the HTML element.
Problem is once this Event is triggered, eVar2 gets set and correctly passes in Analytics call but in each subsequent call (even other than this Event based rule where this eVar2 not even referred), this eVar2 gets passed with the value that was last being set.
I have tried setting the Expiration to "Hit", "Custom Event" (event, where it was set), but it is still being passed in the subsequent event.
Any other better way to do this is also welcome.
Expiration for eVar is set to "Visit", though I have tried with "Hit" as well, it is still being passed in subsequent calls and can be seen in Adobe debugger.
Yes, DataElement is set to "Page View"