3

The start-date and the end-date parameters don't support the time in it which make sit impossible to get last 24 hours of data. e.g. If I am calling the API at 1:00 PM on 12/12/2015 and want to know data from 12/11/2015 1:00 PM to 12/12/2015 1:00 PM, there is not way I can do that.

I saw there is NdaysAgo which we can supply as start-date and end-date but it is useless, doesn't help. it is same as of passing yesterday's date.

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
  • 1
    Keep in mind that Google Analytics data for the current day is not alway accurate, so requesting data for the past 24 hours, even if this were possible, wouldn't be reliable data anyway. – Philip Walton Aug 18 '15 at 23:05

1 Answers1

-2

Its very simple!... just create a segment in google analytics and use in your code. e.g. create hour segment <= 23 and save it and now go to Query Explorer and enter your segment name it will produce a segment code. Now you can query with this segment id to get your 24 hours data... enjoy :)