Expand my Community achievements bar.

To get the Logged in People report

Avatar

Level 4

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?

6 Replies

Avatar

Community Advisor and Adobe Champion

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..... 

Avatar

Community Advisor and Adobe Champion

I should also say, that if you are doing a segment, keep in mind that using a VISIT scope like that will return all pages in the visit, even ones before the user logged in, and pages after where they may have logged out... it won't just return the page as specified... 

 

All pages within visits that contain that page.

Avatar

Level 4

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. 

Avatar

Community Advisor and Adobe Champion

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.

Avatar

Level 4

Hi Jennifer Thanks,

So, The above you have said is on every hit. But, how can I get Total logins and login visits in Adobe Analytics report from using these segments.

Avatar

Community Advisor and Adobe Champion

Ah, I read you question as "logged in on page x" not "log in action"

 

While it's usually better to have an actual login action being tracked, one of the things you can do is look at moments when users change from "logged out" to "logged in"

 

I created this for someone not too long ago.. if you are using the existence of an guid as your indicator, you can change it from yes and no to exists / does not exist

 

Jennifer_Dungan_0-1705069459322.png

 

Basically, I am using a HIT based segment to try and get the first "yes" login status, following a sequential "no" then "yes".

Note that the container is set to VISIT and "Only Before Sequence"

 

 

HIT

    VISIT Container (ONLY Before Sequence) [

        Logged In Status equals no

        THEN After 1 Hit

        Logged In Status equals yes

    ]

AND

Logged In Status equals yes