month data returned doesn't seem to match the actual month?

43 views
Skip to first unread message

Chris Sowerby

unread,
Sep 18, 2015, 12:10:13 PM9/18/15
to Google Analytics Reporting API
Hi all this is my first post here. :)

I am doing some test on the Query Explorer here: https://ga-dev-tools.appspot.com/query-explorer/
I am putting in the date as 2014-12-01 to 2015-02-28

and the results come out like this:
Month of the yearNew Users
01423
02374
12318

My date range starts in december but the results show my month as being 01 

My final aim is to plot this data on a bar chart using the core reporting API but i really need the month of the year to corespond to the date range.

It seems to always start at 01 when it should be the supplied start date month - in my example that would be december.

Am i doing somthing wrong?
How would i get back the month?

Thank you.

Matt

unread,
Sep 19, 2015, 11:35:33 AM9/19/15
to Google Analytics Reporting API
Hi and welcome,
I think you will need to do the sorting client side. The API is sorting the dimensions numerically not by their chronological order. Since your date ranges wrap around the end of the year this creates a problem. If you were to query from January to December everything would be in the correct order.
-Matt

Chris Sowerby

unread,
Sep 21, 2015, 10:07:12 AM9/21/15
to google-analytics...@googlegroups.com
Ah ok i will have to code some php to order month after i can pulled the data in.
:D

Thanks.

Regards.

Christopher Sowerby.

Web Developer.


surgemarketingsolutions.co.uk

Direct Line: 01642 243265.

Chat with us on Twitter, Pinterest and Facebook.


--
You received this message because you are subscribed to a topic in the Google Groups "Google Analytics Reporting API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-analytics-data-export-api/NcMrEeXdoR0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-analytics-data-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris Sowerby

unread,
Sep 21, 2015, 10:14:04 AM9/21/15
to google-analytics...@googlegroups.com
Oh ok i can also get back the year as well as the month and then sort by year ascending this will help me plot it. 

Regards.

Christopher Sowerby.

Web Developer.


surgemarketingsolutions.co.uk

Direct Line: 01642 243265.

Chat with us on Twitter, Pinterest and Facebook.


chris@shufflepoint

unread,
Sep 21, 2015, 10:44:55 PM9/21/15
to Google Analytics Reporting API
Rarely does it make sense to query ga:month without ga:year. Can also use ga:yearMonth
To unsubscribe from this group and all its topics, send an email to google-analytics-data-export-api+unsubscribe@googlegroups.com.

Chris Sowerby

unread,
Sep 22, 2015, 5:45:46 AM9/22/15
to google-analytics...@googlegroups.com
thanks chris.

Regards.

Christopher Sowerby.

Web Developer.


surgemarketingsolutions.co.uk

Direct Line: 01642 243265.

Chat with us on Twitter, Pinterest and Facebook.


To unsubscribe from this group and all its topics, send an email to google-analytics-data-...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Google Analytics Reporting API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-analytics-data-export-api/NcMrEeXdoR0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-analytics-data-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages