[GA-API] Question about ga:month

691 views
Skip to first unread message

chrissky

unread,
Apr 30, 2010, 3:04:29 PM4/30/10
to google-analytics-api - GA Data Export API
http://www.google.com/analytics/feeds/data?ids=ga:xxx&dimensions=ga:month&metrics=ga:visits&start-date=2009-01-01&end-date=2009-12-31

- you get entries for each month (Jan-Dec)

But for this query

http://www.google.com/analytics/feeds/data?ids=ga:xxx&dimensions=ga:month,ga:visitorType&metrics=ga:visits&start-date=2009-01-01&end-date=2009-12-31

- you get entries only for months with data (Oct-Dec)

Is that by design? It seems inconsistent.

--
You received this message because you are subscribed to the Google Groups "GA Data Export API" group.
To post to this group, send email to google-analytics...@googlegroups.com.
To unsubscribe from this group, send email to google-analytics-data-...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-analytics-data-export-api?hl=en.

chrissky

unread,
May 6, 2010, 1:11:37 AM5/6/10
to google-analytics-api - GA Data Export API

Just bumbing my own post since I had yet another client ask why this
was the case.

jk

unread,
May 10, 2010, 2:34:49 PM5/10/10
to google-analytics-api - GA Data Export API
What are your numbers for Jan - Sept in your first query? If they were
0 visits for these months, then you will have no data to report for
the visitorType in the next query.

When did you install the analytics tracking code on the site? I'm
guessing that it wasn't installed until Oct 2009.

You can try out your queries here: http://code.google.com/apis/analytics/docs/gdata/gdataExplorer.html

I duplicated what you are talking about and I had 0 visits in the
first query for the missing months in the second query. In other
words, there was no data for the second query to return so it did not
return any.

On May 6, 1:11 am, chrissky wrote:
> Just bumbing my own post since I had yet another client ask why this
> was the case.
>
> --
> You received this message because you are subscribed to the Google Groups "GA Data Export API" group.
> To post to this group, send email to [email address].
> To unsubscribe from this group, send email to [email address].

chrissky

unread,
May 11, 2010, 11:23:30 PM5/11/10
to google-analytics-api - GA Data Export API
I'll still call it inconsistent since the same argument can be made if
only ga:month is present. But in that case it does return entries. I'm
not asking why - I'm asking why it is inconsistent.

Nick

unread,
May 11, 2010, 11:54:26 PM5/11/10
to google-analytics-api - GA Data Export API
Hi Chris,

It's by design. Dimensions are all treated as strings. For a date
range we know what should be filled in, but for other dimensions we
have no way of knowing how many and what the values should be.

If you feel there should be a different response, feel free to open up
a feature request with what you think should be there instead.

Thanks!
-Nick

chrissky

unread,
May 12, 2010, 8:20:27 PM5/12/10
to google-analytics-api - GA Data Export API
Hey,

Ok. That makes sense. But I think that for typical use cases it would
be better to always "fill in" months (and other time dimensions which
behave that way). Perhaps the feed schema needs to support having null
values for other dimension members.

<dxp:dimension name="ga:visitorType" xsi:null="true" value="" />

I'll open a feature request. But I'd be curious to hear others
opinions.

- Chris

Nick

unread,
May 12, 2010, 8:38:20 PM5/12/10
to google-analytics-api - GA Data Export API
Thanks,

I would like to hear if others have been running into this as well.

Right now ga:visitorType returns 2 values New Visitor and Returning
Visitor. So for each month, two feed entries will be added, or put
another way the month dimension will be replicated twice. So how many
times would you replicate for this null entry?

Would you keep the table structure consistent and return 2 entries for
each month with null visitorType values or only return 1 month for
each?
Both approaches have pros and cons. Is it better to let developers
decide as we do now?

-Nick

chrissky

unread,
May 13, 2010, 4:04:23 PM5/13/10
to google-analytics-api - GA Data Export API
I had been thinking one entry (because ga:month, etc. are special),
but I can see an argument being made to have two. What say you are the
pros and cons, Nick? That might help other ponder it.
Reply all
Reply to author
Forward
0 new messages