Expand my Community achievements bar.

The Analytics Community Lens news letter for February 2024 is now here! Come see upcoming events and what's been going on in the community!

User ID tracked in prop shows more visit than evar why?

Avatar

Level 6

We track user ID when a user login website. This user id is tracked in both prop and evar and both fires in all authenticated pages (as soon as logged in). But when I use prop in creating segment in "Hit level" something like

User ID doesnt exist I am seeing way more visits but if I create same hit level segment using evar I am seeing way less number.

 

Evar expiry set to "never"

 

propid.png

 

 

evarid.png

 

 

 

 

This number is using props

 

prop.png 

 

This number is using evar

evar.png

 

This is the segment

3.png

 

5 Replies

Avatar

Community Advisor

AA is reporting correctly.

Your prop tracks the value when that value has been set in a hit.

Your eVar also tracks the value when that value has been set in a hit. But since you have configured to have "Never" expiry, then that value gets attributed with all subsequent hits forever until a new value is tracked.

Here's a simple example:

Hit 17: prop set with "123", eVar set with "123".

Hit 18: prop not set with anything, eVar's "123" continues to be attributed here.

Hit 19: prop not set with anything, eVar's "123" continues to be attributed here.

Hit 20: prop set with "789", eVar set with "789".

See how the value "123" has been set with 1 hit based on the prop, but 3 hits based on the eVar.

So when you have your segment where the prop does not exist, the segment includes hits like Hit 18 and Hit 19. Yet, since the eVar value persisted, so when you have your segment where the eVar does not exist, the segment does not include Hit 18 nor Hit 19.

And so you can expect fewer visits with the eVar-based segment than with the prop-based segment.

Avatar

Level 6

In this case I am trying to find mobile device logged in visits vs not logged in visits which one I should use segment for user id prop or evar?

Avatar

Community Advisor

I don't know. It depends on how and why you are tracking the same user ID to a prop and to an eVar. There was probably a good business reason for this. When you find out that reason, then you will know how to answer your question.

Avatar

Community Advisor

While I don't know your specific rules, in general tracking a Visitor Id with a "never" expiry is a technique that is generally used to "fingerprint" a user (whether they are logged in or not).

 

The first time they log in, the ID is set... then it is remembered forever (or until they log in with another account). It doesn't matter if the user logs out, the ID is retained. Making this not ideal to check the login status.

 

On your prop, just to clarify... I believe you are saying it's set on the login action and every page/action where the user is logged in? Or is it just on the login action? Or just sent on pages that require login (but maybe not on other pages like home page)?

 

Understanding how and where you variables are set and sending data is really key to being able to build out proper reports.

 

For my site, I track the user ids separate from the login status, but I also don't use extended expiry on our user ids (this was a choice, and we made it knowing that we have users on shared machines, and thus, when a user specifically logs out, we should treat them as such, and therefore don't continue to track the ID. However, if a user's session "expires" (i.e. not active in 30 days); we still know the ID and track it when they return to the site.

 

So I can have:
Logged Out / No ID
Logged Out / with ID
Logged In / with ID

Avatar

Level 6

Yes it's set on the login action and every page/action where the user is logged in