Set eVar Once per Visit | Community
Skip to main content
AliMaleki
Level 4
March 29, 2017
Solved

Set eVar Once per Visit

  • March 29, 2017
  • 3 replies
  • 1913 views

I want to set the value of an eVar on the first hit of every visit. 

Customer Care suggested I use the getValOnce plugin but it's not clear how/if this would give me what I want in DTM

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by jantzen_b

Hi,

All AppMeasurement plugins would be deployed inside the Analytics tool in DTM. You would need to ensure your library management setting is set to custom. This will allow you to open an editor that looks similar to if you were to deploy the AppMeasurement file directly to your site. Once you've gotten to this point, you should be able to deploy the plugin using the documentation.

Once the function is deployed in the do plugins section, you could set up a data element using a custom script to fire the function call.

 

Once the data element is setup, you would set whichever eVar you're using equal to the data element.

 

Please let me know if you have additional questions.

 

Cheers,
Jantzen

3 replies

jantzen_b
Adobe Employee
jantzen_bAdobe EmployeeAccepted solution
Adobe Employee
March 30, 2017

Hi,

All AppMeasurement plugins would be deployed inside the Analytics tool in DTM. You would need to ensure your library management setting is set to custom. This will allow you to open an editor that looks similar to if you were to deploy the AppMeasurement file directly to your site. Once you've gotten to this point, you should be able to deploy the plugin using the documentation.

Once the function is deployed in the do plugins section, you could set up a data element using a custom script to fire the function call.

 

Once the data element is setup, you would set whichever eVar you're using equal to the data element.

 

Please let me know if you have additional questions.

 

Cheers,
Jantzen

AliMaleki
AliMalekiAuthor
Level 4
March 31, 2017

Hi Jantzen, thanks for the reply. I will probably attempt this but I just looked at a test I had setup and I believe it's having the desired result:

DTM: Data Element that returns the current date and time in UTC

DTM: Adobe Tool: Global Variables: Set eVar 47 to above data element

Analytics Admin: eVar 47: Allocation: "Original Value (First)", Expire After: "Visit" 

This seems to work but I'd like your opinion: does this make sense or am I missing something?

Ali

jantzen_b
Adobe Employee
Adobe Employee
March 31, 2017

Hi Ali,

That seems like a viable solution as well. The only difference I can think of off the top of my head would be the image request. Using the getValOnce plug-in would prevent the value from being passed to Analytics via the request more than the first time whereas your method would include the date in multiple image requests. This might inflate metrics like instances if that is important to your use case.

Essentially, you can do the deduplication on the client side with the plug-in, or you can do it on the back end with Analytics allocation.

Cheers,
Jantzen