Keeping track of user logins


(Aneta Puha) #1

Hi all.

Is there a way to easily keep track of user logins?

Id like to create a report containing a list of which users login and, if possible, their activity while they are logged in. 

Anyone have links or info on the best way to start this process?


(Mitchell Essex) #2

We added a metadata schema with a last login date and a history and applied that all our users. We created a trigger that fires when they login that fills in the last login date metadata and concatenates the history field.

 

We have found this useful for reporting purposes and have culled some users that hadn't logged in for a while. 


#3

You guys have ESP! This is just what we were after! Thanks!


(Bart Banda) #4

Yea at the moment the only way to do it is via a trigger and writing some metadata against the user like mitch describes. 

 

If you want more detailed information and a better way to manage and report on it, I would use Universal Analytics with custom events. It has a specific feature for tracking user activity: 

https://support.google.com/analytics/answer/3123662

https://support.google.com/analytics/answer/3123666 


#5

Thanks Bart! This is great. Being able just to report when they have last logged in and last history would be just enough for us.


(Bart Banda) #6

In the next upcoming feature version of Matrix, 5.1, there will be a keyword to expose this information as well to make it even easier to report on and review just from matrix: https://squizmap.squiz.net/matrix/2731 


#7

You beauty! Thanks Bart :slight_smile:


(Aneta Puha) #8

Wow, thanks for the awesome feedback guys. And here I was thinking that I had missed something simple during my manual reading time. Can't wait till 5.1 arrives, till then I'll try out a mix of what Mitch and Bart have said.

Thanks all.


(Aneta Puha) #9

I should have asked this before.

Mitch in your reply you said you made a schema with 2 fields (login date and history) then made a trigger to set the login date and from that create the history.

How are you creating the history part? I made a schema with a date and WYSIWYG field (wasn't sure which one to choose for the history, is this the right one).

 

Currently my trigger fires when a user from a specific group logs in and it sets the date field. I'm lost from here. Any help would be awesome.


(Joel Porgand) #10

How are you creating the history part? 

 

in the set metadata value action for the 'history' field set it to '%globals_date_X%, %asset_metadata_history%' (however you want to format it) and check the 'Replace keywords in the set value'

 

I haven't actually tested that, but I think it should work


#11

So I assume that this will not work for ldap users :frowning:


(Joel Porgand) #12

So I assume that this will not work for ldap users :(

nope.


#13

Thanks JP. Darn


(Aneta Puha) #14

 

in the set metadata value action for the 'history' field set it to '%globals_date_X%, %asset_metadata_history%' (however you want to format it) and check the 'Replace keywords in the set value'

 

I haven't actually tested that, but I think it should work

 

Brilliant, this works perfectly. Thanks heaps :)


(Jira) #15

The below keywords can be used if you use an asset listing to list all users with their last login date :slight_smile:

%asset_attribute_login_date_relative%
%asset_attribute_login_date%