How can I calculate total user time on site across sessions in Google Analytics? - google-analytics

I want to know the total amount of time any one of our users has spent on the site, across sessions. Is there a way to find this stat in Google Analytics?

If you want to track an individual customer through different sessions, it is not natively possible under Google Analytics, and there are quite a few traps you need to avoid to make sure to be complying with the conditions of use of the service. You can find more information here
If you mean tracking the total duration of sessions, Session Duration and Time on Page should give you what you want.
They basically measure the same thing, but can give you slightly different results depending on your implementation.

Related

Real time active users in GA

Looking at Google Analytics Real Time tracking.
Why is there such a difference in the two numbers?
It is a Google Analytics bug, it is an accumulation of the number of active users over time without however the total being decreased once the user is no longer in that state. There is nothing to do, it realigns itself.
https://www.analyticstraps.com/bug-numero-anomalo-di-utenti-attivi-in-tempo-reale/

GA: How much time have my 100 most "obsessed" users spent on my site

Does Google Analytics have enough information to answer the question of how much time have my top 100 users spent on my site? I don't need their user information, I don't care about ID or name which I know it doesn't even have. Just the identification of individual users by the cookie GA uses, and a report of how much time the top 100 loyal users spent on my site.
is such a thing possible at all with GA?
From your comment on Colwin's answer:
I don't need google if I have to track this for GA, I just hoped it already has this information such as "page visit duration" on a per-user, ongoing basis. If I had to feed Google that information myself, I can feed my own database and run analytics on it. Thanks anyway.
The Google analytics sessions is
a group of user interactions with your website that take place within a given time frame. For example a single session can contain multiple page views, events, social interactions, and ecommerce transactions.
Average session duration will be calculated as
total duration of all sessions / number of sessions
I don't think this is available from GA out of the box. But you can build something like this with Custom Dimensions available within GA
This will let you setup and send custom metrics dimensions for users that you can then create reports for.
Google Analytics doesn’t allow you to out in PII but random visitor id's should be fine. You can then compare against your own database outside of GA if needed too.
This will allow tracking the same visitor even without them being logged in to your site.
Sending the custom dimensions could possibly look like this.
ga('send', 'pageview', {
'dimension5': '1234567890'
});
You get 20 free custom dimension slots with GA and 200 with GA 360 -> More info here
I think this article has what you are looking for
https://webanalyticsguy.com/2018/01/18/google-analytics-capture-client-id-reporting-purposes/
It shows how to capture the client id which is a decent way to track a specific user. And goes further to explain how to associate that with a metric, in this case the author uses PageView.
You could change this to Average Session Duration or another metric that gives you a sense of time spent.
I guess that you are looking for something like this:
http://www.analytics-ninja.com/blog/2015/02/real-time-page-google-analytics.html
You can get the counts of the users on your site. You can get the seconds they spent on your website page.
I guess this answer will be helpful too: https://qr.ae/TWpkI0

Could "filling up" Google Analytics with millions of events slow down query performance / increase sampling?

Considering doing some relatively large scale event tracking on my website.
I estimate this would create up to 6 million new events per month in Google Analytics.
My questions are, would all of this extra data that I'm now hanging onto:
a) Slow down GA UI performance
and
b) Increase the amount of data sampling
Notes:
I have noticed that GA seems to be taking longer to retrieve results for longer timelines for my website lately, but I don't know if it has to do with the increased amount of event tracking I've been doing lately or not – it may be that GA is fighting for resources as it matures and as more and more people collect more and more data...
Finally, one might guess that adding events may only slow down reporting on events, but this isn't necessarily so is it?
Drewdavid,
The amount of data being loaded will influence the speed of GA performance, but nothing really dramatic I would say. I am running a website/app with 15+ million events per month and even though all the reporting is automated via API, every now and then we need to find something specific and use the regular GA UI.
More than speed I would be worried about sampling. That's the reason we automated the reporting in the first place as there are some ways how you can eliminate it (with some limitations. See this post for instance that describes using Analytics Canvas, one my of favorite tools (am not affiliated in any way :-).
Also, let me ask what would be the purpose of your events? Think twice if you would actually use them later on...
Slow down GA UI performance
Standard Reports are precompiled and will display as usual. Reports that are generated ad hoc (because you apply filters, segments etc.) will take a little longer, but not so much that it hurts.
Increase the amount of data sampling
If by "sampling" you mean throwing away raw data, Google does not do that (I actually have that in writing from a Google representative). However the reports might not be able to resolve all data points (e.g. you get Top 10 Keywords and everything else is lumped under "other").
However those events will count towards you data limit which is ten million interaction hits (pageviews, events, transactions, any single product in a transaction, user timings and possibly others). Google will not drop data or close your account without warning (again, I have that in writing from a Google Sales Manager) but they reserve to right to either force you to collect less interaction hits or to close your account some time after they issued a warning (actually they will ask you to upgrade to Premium first, but chances are you don't want to spend that much money).
Google is pretty lenient when it comes to violations of the data limit but other peoples leniency is not a good basis for a reliable service, so you want to make sure that you stay withing the limits.

How does collection sampling affect the "live" stats for Google Analytics?

We've noticed lately that as our site is growing, our data in Google Analytics is getting less reliable.
One of the places we've noticed this most strongly is on the "Realtime Dashboard".
When we were getting 30k users per day, it would show about 500-600 people on line at a time. Now that we are hitting 50k users per day, it's showing 200-300 people on line at a time.
(Other custom metrics from within our product show that the user behavior hasn't changed much; if anything, users are currently spending longer on the site than ever!)
The daily totals in analytics are still rising, so it's not like it's just missing the hits or something... Does anyone have any thoughts?
The only thing I can think of is that there is probably a difference in interpretation of what constitutes a user being on line.
How do you determine if the user is on line?
Unless there is an explicit login/logout tracking, is it possible that it assumes that a user has gone if there is no user generated event or a request from the browser within an interval of X seconds?
If that is the case then it may be worth while adding a hidden iframe with some Javascript code that keeps sending a request every t seconds.
You can't compare instant measures of unique, concurrent users to different time-slices of unique users.
For example, you could have a small number of concurrent unique users (say 10) and a much higher daily unique users number like 1000, because 1000 different people were there over the course of the day, but only 10 at any given time. The number of concurrent users isn't correlated to the total daily uniques, the distribution over the course of the day may be uneven and it's almost apples and oranges.
This is the same way that monthly unique and daily uniques can't be combined, but average daily uniques are a lower bound for monthly uniques.

Helping Google Analytics be smarter about unique visitors

Our customers log in from several different computers over the course of a day, and so our unique visitor count in google analytics is really inflated. I'd like to give GA our user ids, for example, so that it could be much smarter about this stat. Is there any way to influence what GA considers a unique visitor?
Besides trickery with cookies (which I wouldn't recommend), there's no "built-in" way to better inform Google Analytics to take into account multiple computers for its Unique Visitors calculations.
However, you could set the user ID in a Custom Variable, and use that to track the number of "real" unique visitors, and the distribution within the users.
_gaq.push(["_setCustomVar", 1, "User", user_id_string ,1]);
Be sure to delete this custom variable once the user signs out, both for privacy and accuracy reasons.
GA uses two cookies __utmb and __utmc. You can try to capture and recreate those if your users authenticate or you have a way of tracking them.

Resources