At the moment, the expiry of eVars is very limited
- If you have an event expiry eVar, it will persist across visits
- You cannot reset an eVar with multiple events
- You cannot clear the value of an eVar dynamically
Examples of why this is bad
- If a visitor selects a product, and then lets their session time out, on the next visit they will be associated with that product even if your website does not remember them
- If you have 2 ways of buying, one online (purchase event) and another reserving in store (referral event) then you cannot expire the products eVar with both, only one
- If you have 2 (non-manditory) search boxes and perform a search in one, it will be persisted even if a user then goes on to perform a search with that search box empty
The fix
Allow us to reset an eVar in the JavaScript beacon. It could be as simple as setting
s.eVar1 = "~empty~"
Which would reset the eVar at that point. It could be done in the s_code or in the DOM