Analytics
2.4K members online now
Understand information in your reports and troubleshoot reporting issues such as self-referrals, (not set) data, and inaccurate information
 
Guide Me
star_border
Reply

Tracking logins

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi all,

 

I'm trying to track how many times a user logs into my website - I have the custom Dimension tracking a non PII userID and this is all working fine. I've also set up a report to see how many sessions they have in a day and I've just realised that this isn't giving me what I want to see - from my understanding, the way sessions are calculated can mean that a User can log in and out multiple times and still have that counted as one session as long as its within the half hour period of inactivity? If that's correct, is there a better way? (I have set up goal tracking for the login and landing page but can't seem to get the Custom dimension involved in this report) 

 

Any help is greatly appreciated. 

 

Smiley Happy 

1 Expert replyverified_user

Re: Tracking logins

Explorer ✭ ✭ ☆
# 2
Explorer ✭ ✭ ☆
Hi,

With GA, it's not feasible to track number of time a particular user logged-in in specific time frame.

We can track the number of successful login attempts, through custom report but specific to a customer it's NO.

Re: Tracking logins

Top Contributor
# 3
Top Contributor
Hi,

you can track how many times a specific userId is:
a. attempting to log in (send an event with the user ID as a custom dimension)
b. login success (not session related yet count the total number of logins - can be sent as a pageview on login success with a custom metric +1 or an event - user id should also be sent)

So basically additional implementation is needed and data should be reported with a custom report.

Kind regards,
Zorin

Web analyst @ escapestudio.net

Re: Tracking logins

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭
Hi Zorin,

Thanks for the response. The log in success sounds interesting, is it possible to have a daily breakdown? Also could you point me to a good resource to help me set this up?

Many thanks!

Re: Tracking logins

Explorer ✭ ✭ ☆
# 5
Explorer ✭ ✭ ☆
Tracking login ID, some time your email address as login ID, won't recommended, If you are tracking any personal identifiable information then Google will block your Analytics account.

Re: Tracking logins

Explorer ✭ ✭ ☆
# 6
Explorer ✭ ✭ ☆
Yes, it is possible. Here is the link that will helps you to implement the event tracking.

https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide?hl=en

You can track two events

1. On clicking on the submit button
2. Post successful login.

With this you can track the login success rate as well.
Marked as Best Answer.
Solution
Accepted by topic author Camelot M
November 2015

Re: Tracking logins

Top Contributor
# 7
Top Contributor
Hi,

It would be as easy as sending a pageview or event one the login is successful (after validation or when you land on a page - depends on the system).

ga('set', 'dimension1', yourUserIdVariable);
ga('set', 'metric1', 1 );
ga('send', 'event', 'Login', 'Success'); // this can be a virtual pageview if you need to create a funnel

Yes daily breakdown is applicable.

Kind regards,
Zorin

Web analyst @ escapestudio.net