Newbie Question! I'm using the web api I'm able to get the entire totals over a date range, but I want the daily totals too! Sounds simple enough, but I can't get it. Trying
https://www.googleapis.com/analytics/v3/data/ga?ids=ga:AAAAAAA&start-date=2013-09-20&end-date=2013-09-30&metrics=ga:visitors,ga:visits,ga:bounces,ga:newVisits,ga:entrances,ga:pageviews,ga:uniquePageviews,ga:timeOnPage,ga:exits,ga:timeOnSite&query(start-date,end-date)&access_token=XXXXX
I can see in the console that I have data on more than one day during this range.
It appears you can add a "dimension" of ga:date (or week or year) that will return that granularity of detail to the queries.
Related
I am using Apache Superset for reporting purpose. I am want to draw a chart to show the graph for present Month. I used several ways but it is showing me the last day of the month. I used this method and other like start of this month It is showing me end of this month. Please show me the correct way to get the data of the current month.
After a rigorous research I found the answer. here it is
datetrunc(datetime("this month start"), month)
I have a Google Analytics question that seemed simple but is now confusing the hell out of me. The client doesn't want data for a date range, but rather 27 individual dates. I can only seem to see ways to set date ranges , not a collection of individual dates. Is there a way to do this?
You can't select individual dates just only a single day or an interval.
I have a user based segment created in GA that is working as expected. However, with user based segments, one can only apply a maximum date range of 90 days to the report.
This is as per their documentation (Limits on segments): https://support.google.com/analytics/answer/3123951?hl=en
Is there a workaround this? I have a use case where I would want to apply the user based segment over a date range of ~1-2 years to get a better sense on the trend over time.
If I re-create the GA report in Google Data Studio - is there a way to apply this user based segment over a longer date range?
Thanks!
No there's no option for extending 90-days reporting timeframe. The only solution is to get user-level data through the Reporting API and process them within 3rd party software. However, to do that you'll need some custom tracking implemented beforehand.
I'm trying to get all unique visitors for a selected time period, but I want to filter them by date on the server. However, the sum of unique visitors for each day isn't the number of unique visitors for the time period.
For example:
Monday: 2 unique visitors
Tuesday: 3 unique visitors
The unique visitors for the two days period isn't necessarily 5.
Is there a way to get the results I want using the Google Analytics API (v3)?
You're right that Users aren't additive, so you can't simply add them day by day. There are several ways around this.
The fist and most obvious is that if you've implemented the User-ID you should be able to straight up pull and interrogate the data about which users saw your site on which days.
Another way I've implemented before is to dynamically pull the number of Users from the Google Analytics API whenever you need it. Obviously this only works if you're populating a live web dashboard or similar, but since it's just the one figure you're asking for, it wouldn't slow down the load time by much. Eg. if you're using a dashboarding tool such as Klipfolio, you may be able to define a dynamic data source, and query Google whenever you needthe figure (https://support.klipfolio.com/hc/en-us/articles/216183237-BETA-Working-with-dynamic-data-sources)
You could also limit the number of ways that the data can be interrogated, and calculate all of them. For example, if you only allow users to look at data month-by-month or day-by-day, then you only need those figures.
Finally, you can estimate the figure with reasonable accuracy by splitting it into two parts. New Users are equal to New Sessions (you're only new on your first Session), which is additive, so that figure can be separated out and combined as required.
Then, you could take a rough ratio of new to returning Users (% New Users) from, say, 1 year of data, and use that with the New Users figure to generate an average on any level.
I would like to obtain data via the Google analytics api (Java). Every half an hour once I would be running a script which needs to get me the required variables over the previous half an hour, that is details of the person who has used my site over the last half hour. I do not know if this is possible since the start date and end date parameters can be used only in date format and not in datetime format. How should I proceed with this? Thanks in advance
Google Analytics core reporting API provides 2 dimensions which are the hour and the minute. This should allow you to accomplish what you want, just make sure to wait till the hour and minute you are querying are updated.
Check
https://developers.google.com/analytics/devguides/reporting/core/dimsmets#view=detail&group=time&jump=ga_hour