To get the Logged in People report | Community
Skip to main content
Level 4
January 10, 2024
Question

To get the Logged in People report

  • January 10, 2024
  • 1 reply
  • 1380 views

Hi Everyone,

I have a page where the I need to get the no of logins, So, I have pagenames which I can say if pagename starts with this specific page name , ID can say it's  logged in and I have hashed unique I after login , this eVar  will reflect in all the page navigate same as it starts with.

So I have made a segment but  not sure will the below segment will give me exact total logins .

VISIT Container[

Pagename.    Starts with.      A

AND

Hashed Unique ID exists 

]

 

So, My report will be 

Day in dimension and Above segment filter by Visits in metrics .

 

Can anyone tell me is this the right way to get the logins and will this satisfy if the single login is being persisting for 2 session?

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

1 reply

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
January 10, 2024

Without knowing how your site works, that is hard to say... 

 

You said you have a hashed value in the URL for logged in users? What happens if I take that URL and load it in my browser? Will I be logged in? Will I be redirected to another page without that hash telling me that I am not logged in?

 

Typically what I do is I have a HIT level variable (either a prop or an eVar) that tracks "login status"... depending on the complexity of the site, I can either read from cookies/session variables to determine if the user is logged in.. or if there is additional logic to the site (such as there is code that checks for a valid authentication token to fully determine the logged in state), I then ask the developers to add a login status into my data layer (true/false, yes/no, userId exists / doesn't exist)... whichever method makes the most sense for the implementation, then I track on each page if the user is logged in or not... then I can create segments based on that.

 

Since you don't have a dimension at this point, creating a proxy is a good alternative, but you really have to understand your site behaviour to understand if there is a possibility that someone could have a hashed value and not be logged in..... 

AEPAAAuthor
Level 4
January 11, 2024

Hi Jennifer, 

 Actually, I am passing a eVar(dimension) - hashed ID on every page call not with the Url , which I made it as a calculated metric using approximate distinct count and calling it Unique hashed ID. 

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
January 11, 2024

Ah, sorry, I either mis-read or mis-interpreted your question.

 

Next question about your eVar, does it have a HIT expiry or a VISIT expiry?

 

Hopefully it uses HIT, or is still specifically set where the hash exists, example:

 

  • Page A (not logged in)
    • eVarX not set
  • Page B (login page, not logged in yet)
    • eVarX not set
  • Login Action (may or may not be tracked)
  • Page C (logged in)
    • eVarX set to hash 
      • IF Hit expiry will have value
      • IF Visit expiry will also have a value
  • Page D (still logged in)
    • eVarX set to hash 
      • IF Hit expiry will have value
      • IF Visit expiry will also have a value
  • Action 1 (still logged in)
    • Depends on if eVar is set here, or relies on Visit expiry
      • IF explicitly set on actions:
        • IF Hit expiry will have value
        • IF Visit expiry will also have a value
      • IF Not explicitly set on actions:
        • IF Hit expiry will not have value
        • IF Visit expiry will still have a value
  • Logs out (again, may or may not be tracked)
  • Page E
    • eVarX not set to hash (as this should no longer exist to read)
      • Hit expiry will not have value
      • Visit expiry will still have a value

 

There are a few considerations... the expiry of your eVar, whether you are explicitly setting that eVar on actions...

 

For such a purpose I use Hit Expiry in my implementation, because when a user logs out, they will no longer have a value (which its existence is also a indicator of status - custom attribution could always be used to determine the hash of people that used to be logged in). I also explicitly send the value on both Pages and Actions...

 

Anyway, I have two standard segments:

 

Logged In

HIT

    eVarX exists

 

and

 

Logged Out

HIT

    eVarX does not exist

 

 

Then technically I can pair this with the while site, or specific metrics (i.e. orders) or with specific pages

 

 

If your eVar is set to Visit, the above won't work, as there could still be pages that show "logged in" after the user has actually logged out... you could do something like this in this case:

 

Logged In

HIT

    eVarX exists

    AND

    Instance of eVarX exists

 

and

 

Logged Out

HIT

    eVarX does not exist

    OR

    Instance of eVarX does not exist

 

 

While you could create a segment for the page and logged in status combined, if you have separate, more generic "logged in" / "logged out" segments they can be re-used for many reports.