event tracking - portal vs api

6 views
Skip to first unread message

chrissky

unread,
Nov 21, 2009, 10:42:46 AM11/21/09
to google-analytics-api - GA Data Export API
Hi,

I need to get an understanding of events as represented by the portal
vs by the api. Specifically, I would like to understand the "Visits
with Event" and "Events / Visit" fields in the portal, and what
calculations on api values can give equivalent results.

Thanks!

Nick

unread,
Nov 23, 2009, 1:53:50 PM11/23/09
to google-analytics-api - GA Data Export API
Hi,

Visit with event is a metric we are not currently exposing through the
API. It's calculation is all the visits that had an event. Events/
Visit is calculated metric defined by: Total Events / (Visits with
Event).

Feel free to open a feature request for this one new metric.

Thanks!
-Nick

chrissky

unread,
Nov 24, 2009, 1:11:04 PM11/24/09
to google-analytics-api - GA Data Export API
Hi Nick,

Is it possible to use a filter to get "visits that had an event"?
I tried with filter = ga:totalEvents > 0 but it didn't change the
results.

Chris

Nick

unread,
Nov 24, 2009, 3:00:30 PM11/24/09
to google-analytics-api - GA Data Export API
Hey,

So for that you would need an advanced segment.

From a high level, when you make a query to the GA API, dimensions and
metrics for all visits are returned as a table of data. When you add
filter we only remove rows from that generated table of data that fit
the criteria. Advanced Segments allows you to specify a segment of all
the visits to your site, for examples ones with an Event. GA then
calculates dimensions and metrics from these segmented visits and
returns a table.

Currently Advanced Segmentation through the API is an open feature
request.

-Nick

chrissky

unread,
Nov 24, 2009, 9:43:22 PM11/24/09
to google-analytics-api - GA Data Export API
Hi Nick,

I thought that was the case, given my findings. But figured it
couldn't hurt to ask.

Hey, I just noticed an error in the documentation

http://code.google.com/apis/analytics/docs/gdata/gdataReferenceDataFeed.html

- says metric type is "either integer or string"
I had checked because I was looking for the full type enumeration

- Chris

Nick

unread,
Nov 24, 2009, 10:21:48 PM11/24/09
to google-analytics-api - GA Data Export API
Ah, Thanks for pointing that out.

An push with the fix should happen before tomorrow morning.

-Nick


On Nov 24, 6:43 pm, chrissky wrote:
> Hi Nick,
>
> I thought that was the case, given my findings. But figured it
> couldn't hurt to ask.
>
> Hey, I just noticed an error in the documentation
>
> http://code.google.com/apis/analytics/docs/gdata/gdataReferenceDataFe...
Reply all
Reply to author
Forward
0 new messages