Expand my Community achievements bar.

SOLVED

Getting value of an Evar as Unspecified in mobile

Avatar

Level 2

In my mobile application, when a user logs in, he/she is given a UserId, which I am capturing and sending with each page view within the application. A user can't browse the application without logging in, so UserId is always there. But in my analytics, I am seeing sometimes the value against UserId eVar as Unspecified. I tried breaking it down by Page, but it shows 0 records and when I am breaking the Page metric with UserId, then I am not seeing any UserId as Unspecified. I checked my code also, there is no instance when I am sending UserId without Page. How is it possible that UserId is sometimes Unspecified without any page getting captured? Also, this is specifically mobile app code and can't be used in Desktop or by hitting URL. 
Sample code used for sending details,

const contextData = { userId: 'ABC' };
ACPCore.trackState('Login', contextData);

 

1 Accepted Solution

Avatar

Correct answer by
Level 7

@vivek091195  Can you please check using that eVar's instances metric once and see if it is still Unspecified. Also, if that is the code written exactly than I am not seeing the Page being sent in the context data.
Instances metric will tell you the number of times a user id was sent in the server call whereas if you check the occurances metric than it will included the persistance of that evar as well and can show Unspecified when you break it down some other variable.

View solution in original post

6 Replies

Avatar

Correct answer by
Level 7

@vivek091195  Can you please check using that eVar's instances metric once and see if it is still Unspecified. Also, if that is the code written exactly than I am not seeing the Page being sent in the context data.
Instances metric will tell you the number of times a user id was sent in the server call whereas if you check the occurances metric than it will included the persistance of that evar as well and can show Unspecified when you break it down some other variable.

Avatar

Level 2

Thanks for the reply! When I am using UserId Instances then I am not seeing Unspecified. I didn't get why it is occuring in Occurences metric but not in Instances metric, could you please elaborate it more? 

 

 

Avatar

Level 7

@vivek091195 Instances are the number of times a variable was defined in an image request whereas Occurrences are the total number of hits a variable value was either defined or (for conversion variables) persisted. So as per the expiration settings of your evar the value was persisting and therefore when checking the Occurances metric it is showing as unspecified. Instances will tell you the exact number of times a userid was sent in the server call.

Avatar

Level 2

Hi, if I understood you properly, then I shouldn't be getting UserId as Unspecified in recent dates right? For e.g., if I select Date metric, and break UserId with that, then I get Unspecified as well. Please correct me if I am wrong.

Screenshot 2021-08-26 at 11.27.37 AM.png

Avatar

Level 7

@vivek091195 It is not about the date. Simply use the userid dimension and then use that userid dimesion instance as metric and select any date range from the date range selector panel in the project. Than check if 'Unspecified' is coming or not.

Avatar

Level 7

@vivek091195 Does that solved your query ? If yes than can you please mark the answer as correct ? If not than please let us know what issue you are facing.