Stackdriver Retention policy is 30 Days .How Stackdriver dashboards have managed to show data from last 6 weeks? - stackdriver

Stackdriver Retention policy is 30 Days .How Stackdriver dashboards have managed to show data from last 6 weeks ?

As per the docs, Admin activity and access transparency both have retention periods much longer than 30 days. However, the graphs are based off of Stackdriver Monitoring which has a metrics retention policy of 6 weeks

Related

Firebase retention user count mismatch

Hey for mobile app analytics I am using firebase with BigQuery
What I cannot seem to understand is the criteria for the firebase cohort users.
In my firebase dashboard, the monthly retention table shows that for May in Month 0 we have 171 users.
Ok fair enough, but
If I choose the default "unique users" parameter from bigquery events table the unique user count for May is around 500 users.
Ok makes sense so that would mean that the firebase retention dashboard must calculate only new users in each cohort.
However, based on iTunes connect analytics for may we only had 70 downloads. So since we only track the iOS app in firebase I am quite lost as to how the retention cohort groups its respective users.
In short for the month of May:
I had 70 new downloads
500 unique users
but the firebase retention dashboard shows that we have 171 users in Month 0 for May
So the question is:
By what criteria does the firebase dashboard group their respective users each month?
Thanks

How to get/show the total website visits from google analytics?

We are using google analytics on our website to record the statistics. however, we need to show the total visits is it possible to show from google analytics API? TIA
Im not sure where you want to show the total visits but if its on your website you need to remember a few things about the Google Analytics api.
The first being that there is a data latency which means that it takes between 24 -48 hours for your data to complete processing. If you attempt to request say the current visits for today then the number will not be correct. You could request the number of vists for say three days ago and get back a number that is stable.
The other issue you are going to have is with quota. If you intend to load this from the API everytime a user visits your website they you will quickly run out of quota as you can only make 10k requests against a view in a single day so depending upon how many times this page is loaded this may not work for you.
An idea would be to load the data once at night and store the data in your database some place and then load from that as then you are only making a single request to the api and are unlikely to run out of quota.
Google anlaytics reporting api v4
Yes, just get ga:sessions metric defining the time interval that interests you.
Core Reporting API: https://developers.google.com/analytics/devguides/reporting/core/v3/common-queries
The Dimensions & Metrics Explorer lists: https://ga-dev-tools.appspot.com/dimensions-metrics-explorer/

How to get core query Explore in Google Analytics

Here i have got JSON values from this i have used in query core explore but i got 0 value
{"kind":"analytics#gaData","id":"https://www.googleapis.com/analytics/v3/data/ga?ids=ga:181407717&metrics=ga:pageviews,ga:uniquePageviews&start-date=7daysAgo&end-date=today","query":{"start-date":"7daysAgo","end-date":"today","ids":"ga:181407717","metrics":["ga:pageviews","ga:uniquePageviews"],"start-index":1,"max-results":1000},"itemsPerPage":1000,"totalResults":1,"selfLink":"https://www.googleapis.com/analytics/v3/data/ga?ids=ga:181407717&metrics=ga:pageviews,ga:uniquePageviews&start-date=7daysAgo&end-date=today","profileInfo":{"profileId":"181407717","accountId":"125404806","webPropertyId":"UA-125404806-1","internalWebPropertyId":"183966900","profileName":"All Web Site Data","tableId":"ga:181407717"},"containsSampledData":false,"columnHeaders":[{"name":"ga:pageviews","columnType":"METRIC","dataType":"INTEGER"},{"name":"ga:uniquePageviews","columnType":"METRIC","dataType":"INTEGER"}],"totalsForAllResults":{"ga:pageviews":"4","ga:uniquePageviews":"2"},"rows":[["4","2"]]}
totalsForAllResults":{"ga:pageviews":"4","ga:uniquePageviews":"2"},"rows":[["4","2"]]}
Your request appears to returning results just fine. if these aren't the numbers you were expecting then you may want to consider the following as you have added today in your request.
The Google analytics core reporting api is for extracting data from Google analytics it is not intended for extracting resent data from Google analytics as It takes 24 - 48 hours for the data to be processed on the servers.
Data latency
Data processing latency
Processing latency is 24-48 hours. Standard accounts that send more than 200,000 sessions per day to Analytics will result in the reports being refreshed only once a day. This can delay updates to reports and metrics for up to two days. To restore intra-day processing, reduce the number of sessions your account sends to < 200,000 per day.
Try doing the same request but do it for a few days ago. or try using the Google antlyics realtime api which only displays the last five minutes of data give or take.

How long Google Analytics take to process the data from the day before?

I am using the Analytics API to get the number of sessions from the previous day. I run this code at 5am.
When I get to the office at 9am, querying the API again (or seeing the analytics
interface) returns me a higher number then the one I got at 5am.
So, how long does Analytics take to update data from day before? Is this the issue or could it be something else? I was thinking could be something timezone related, but after getting my head through it, now, I think it can't.
Thanks
It takes between 24 and 48 hours for data to finish processing in Google Analytics. This is true for both the Google Analytics API and the Google Analytics website. Although the website might get data before the API but I have been unable to prove this because by the time you make the request again both have changed. Its probably not related to time zone its from the time the hit was recorded.
Data limits
Data processing latency Processing latency is 24-48 hours. Standard
accounts that send more than 200,000 sessions per day to Analytics
will result in the reports being refreshed only once a day. This can
delay updates to reports and metrics for up to two days. To restore
intra-day processing, reduce the number of sessions your account sends
to < 200,000 per day. For Premium accounts, this limit is extended to
2 billion hits per month.

Google Analytics API Does Not Return Data

I've been having issues with the Google Analytics (GA) API over the past several weeks. Our application regularly (every 2h) queries the GA API for visitor numbers from clients of ours.
However, sometimes the GA API suddenly returns only 0s for page metrics that previously provided data. This doesn't happen for all websites, only for a few, occasionally. The problem always starts around midnight (GMT) and persists for up to 24 hours.
It definitely isn't a quota error, as we would have caught that. In fact, Google's API doesn't return any error at all, it just returns 0s for all requested metrics.
Has anyone experienced this issue before? How can I solve this as it's bit of a show stopper.
In the hope this also helps other people I found the answer to my question by scouring the documentation:
https://support.google.com/analytics/answer/1070983?hl=en
Processing latency is 24-48 hours. Standard accounts that send more
than 200,000 sessions per day to Google Analytics will result in the
reports being refreshed only once a day. This can delay updates to
reports and metrics for up to two days. To restore intra-day
processing, reduce the number of sessions you send to < 200,000 per
day. For Premium accounts, this limit is extended to 2 billion hits
per month.
i.e if you are querying a non premium google analytics account with more than 200,000 visitors per day you can expect there to be intermittent lags in results for the last 48 hours. This issue was observed by us as google returning 0's, rather than some error.
This makes sense from Google's perspective as data processing = cost, as such it makes sense to leave processing for large sites (which are not paying for GA anyway) for when servers are loaded less heavily.

Resources