Regarding counter type eVars and how to use them | Community
Skip to main content
Sebastiane_Edberg_
Community Advisor
Community Advisor
September 24, 2020
Solved

Regarding counter type eVars and how to use them

  • September 24, 2020
  • 1 reply
  • 3183 views

Hi community, regarding counter evars, short use case: increment a counter evar by 1 if a user swipes a menu either to the left or right in mobile view. It has been setup with two different direct calls (for swipe direction left or right) and each time the respective evar is incremented by 1, (in custom code s.evarX = "+1"). 
Now the idea is to use these two evars and breakdown visitors in containers based on how much they swipe. 
First of, if this evar is dropped on a freeform table the "occurences" column will show how many times that evar was incremented by 1 during the selected timespan right? By doing that we see a reasonable amount of occurences on mobile devices at least.
The problem arises when trying to make a segment that for example says that if the value of the evar for a mobile device visit is greater than 10 (the user swiped more than 10 times), no matter what the segment builder cant seem to find any visitors where there´s even a value exists in these evars, so what have we missed?

 

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 Jacob-DDdev

Hi @sebastiane_edberg_ ,

 

Not sure if occurrences is sufficient for the use you are mentioning unless you are sure to set the evar to expire on each hit.

 

As an alternative, to reduce evars and allow cleaner reporting, have you considered just one evar for direction and then an event for when someone has swiped in the app? Then it would look like dragging a single evar onto a table with a breakdown of "Left" vs "Right" and a specifically named metric just for app swipes.

 

In fact, you could avoid adding any evars by sticking the direction into another evar with information on the page/panel being viewed. That is, if they swiped right from page 3 to page 2, a developer could put into a pagename variable the value of "Page2<delimiter>R", or if someone swiped left from page 4 to page 5 "Page5<delimiter>L". Then using classifications on this variable, you could break it apart at the delimiter for normal reporting. So the left side of the delimiter can be grouped into a classified pagename and the right can be classified into a swipe direction variable.

1 reply

Jacob-DDdev
Jacob-DDdevAccepted solution
Level 6
September 24, 2020

Hi @sebastiane_edberg_ ,

 

Not sure if occurrences is sufficient for the use you are mentioning unless you are sure to set the evar to expire on each hit.

 

As an alternative, to reduce evars and allow cleaner reporting, have you considered just one evar for direction and then an event for when someone has swiped in the app? Then it would look like dragging a single evar onto a table with a breakdown of "Left" vs "Right" and a specifically named metric just for app swipes.

 

In fact, you could avoid adding any evars by sticking the direction into another evar with information on the page/panel being viewed. That is, if they swiped right from page 3 to page 2, a developer could put into a pagename variable the value of "Page2<delimiter>R", or if someone swiped left from page 4 to page 5 "Page5<delimiter>L". Then using classifications on this variable, you could break it apart at the delimiter for normal reporting. So the left side of the delimiter can be grouped into a classified pagename and the right can be classified into a swipe direction variable.

Sebastiane_Edberg_
Community Advisor
Community Advisor
September 25, 2020
Hi, thanks for replying, i might have missed something important here, hope you can help me understand. The evars are set to expire after visit, wouldnt that mean that the evar value for a visitor that swipes 10 times would be 10 for that visit? As it is incremented by +1 each swipe? Or maybe that is not how the counter evar type works?