Number of keywords

105 views
Skip to first unread message

Stephane Guerin

unread,
Mar 7, 2012, 8:57:54 AM3/7/12
to google-analytics...@googlegroups.com
Hi,

In the former version of GA, keywords report displayed a text like this: "Search sent 635 total visits via 131 keywords".

It's not available anymore in the current version GA. And it seems that it's not possible to get that number from the API too except by downloading the whole keyword list and counting the results. This gets complicated if we want the number per date as we have to create a request for each day of the year...

Maybe I got this wrong. Is there a faster and more efficient way of getting the number of keywords that brought traffic from the API?

We're using Core Reporting V3.

Thanks for any idea,

Stéphane

Nick

unread,
Mar 7, 2012, 2:50:58 PM3/7/12
to google-analytics...@googlegroups.com
Hi,

So getting this is pretty easy.

First off you do NOT want to use the data in the rows. As you mentioned, the rows returns a "page" of results from analytics. Instead you want to use the totalResults field to get the total number of results matched in GA. Then you want to look at the totalsForAllResults object that contains the total value of the metric for all the results matched in GA. The UI uses both of these fields to populate the text you see.

btw here's a reference for all the fields the API returns: http://code.google.com/apis/analytics/docs/gdata/v3/reference.html#response_fields

-Nick

Stephane Guerin

unread,
Mar 8, 2012, 11:53:33 AM3/8/12
to google-analytics...@googlegroups.com
So simple.

Thanks!

Stephane
Reply all
Reply to author
Forward
0 new messages