Expand my Community achievements bar.

SOLVED

How to expire an eVar in the same session

Avatar

Level 3

I have an application on a site where I am setting eVars. However, I want certain eVars to be reset when the user starts or finishes the whole flow of the application within the same session. 

 

For example, let's say that the user starts the application within the site, halfway through they go to a separate part of the website and then they return to the application. When they return and restart the application (within the same session), selected eVars need to be reset. 

 

How can I achieve this? 

 

Thanks in advance! 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

You could set your eVar expiry to be a specific event (you can only choose one event, not two)... so you could fire an event at the start and end of the flow.

 

In "Expire After" on your eVar configuration, it will start with all the standard expiries (Visit, Hit, Never, Minute, Hour, etc...) and then after all of those, all of your custom events will be listed.. 

 

Jennifer_Dungan_0-1705910566640.png

(so instead of my example showing "Expire After Registrations (event 1)", you would have to set up an event that would trigger on the start and end of your flow.... 

 

 

Keep in mind, that your eVar will maintain its value until it hits it's expiry, or until its overwritten... are you sure you need to expire the value at the start / end of this flow? You might be over-complicating your implementation unnecessarily? As in, do you really need to expire the value at these points? Maybe you do, maybe you don't... I am not sure what you are trying to achieve...

 

You seem to be new to Adobe (based on the questions I've seen), so if you help by explaining what your end goal is, myself and others may have other suggestions for implementation that could make your life easier.

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

You could set your eVar expiry to be a specific event (you can only choose one event, not two)... so you could fire an event at the start and end of the flow.

 

In "Expire After" on your eVar configuration, it will start with all the standard expiries (Visit, Hit, Never, Minute, Hour, etc...) and then after all of those, all of your custom events will be listed.. 

 

Jennifer_Dungan_0-1705910566640.png

(so instead of my example showing "Expire After Registrations (event 1)", you would have to set up an event that would trigger on the start and end of your flow.... 

 

 

Keep in mind, that your eVar will maintain its value until it hits it's expiry, or until its overwritten... are you sure you need to expire the value at the start / end of this flow? You might be over-complicating your implementation unnecessarily? As in, do you really need to expire the value at these points? Maybe you do, maybe you don't... I am not sure what you are trying to achieve...

 

You seem to be new to Adobe (based on the questions I've seen), so if you help by explaining what your end goal is, myself and others may have other suggestions for implementation that could make your life easier.

Avatar

Community Advisor

Following from @Jennifer_Dungan 's reply, assuming that expiring by a Success Event doesn't work for you (for the reasons that she's provided), and you absolutely, positively need to ensure that your eVar expires within the same session, then you will have to resort to:

  1. Using a "Hit" expiration with your eVar.
  2. Ensuring that in your implementation, you are always setting a value in the eVar when it should have one.

You will not be able to rely on the persistent nature of eVars then.