Events

Retrieves Event data.

Table Specific Information

Select

Google Analytics only allows up to 10 Metrics and 7 Dimensions in a single query. Therefore, when issuing a query that selects all columns, only the default Metric columns will be selected for tables with more than 10 Metrics. The default Dimensions will be used unless you explicitly select other dimension columns. The following query uses EventLabel instead of the default EventCategory dimension:

SELECT EventLabel, TotalEvents, UniqueEvents, EventValue, SessionsWithEvent, AvgEventValue, EventsPerSessionWithEvent FROM Events
Filters can also be used in the WHERE clause. Dimension fields support the =, !=, LIKE, and NOT LIKE operators. Metric fields support =, !=, >, >=, <, and <= operators. This query will return all Events with less than or equal to 200 total events:
SELECT EventLabel, TotalEvents FROM Events WHERE TotalEvents <= 200
All reports in Google Analytics must cover a specific date range. The default behavior is to pull the last month of data if the StartDate and EndDate inputs are left unset. To override this behavior, the values can be set directly in the query. For example:
SELECT * FROM Events WHERE StartDate='39daysAgo' AND EndDate='Today'
The default dimension for the table will be used unless another dimension is specified in the select columns, the DefaultFilter, or the Dimensions column in the WHERE clause. See the note on Establishing a Connection for a limitation with some tools. The following queries return the same results:
SELECT * FROM Events
SELECT EventCategory, TotalEvents, UniqueEvents, EventValue, SessionsWithEvent, AvgEventValue, EventsPerSessionWithEvent FROM Events

Columns

Name TypeDimensionDefaultMetricDefaultDimensionDescription
Date DateTrue The date of the session formatted as YYYYMMDD.
Year IntegerTrue The year of the session. A four-digit year from 2005 to the current year.
Month IntegerTrue The month of the session. A two digit integer from 01 to 12.
Week IntegerTrue The week of the session. A two-digit number from 01 to 53. Each week starts on Sunday.
Day IntegerTrue The day of the month. A two-digit number from 01 to 31.
Hour IntegerTrue A two-digit hour of the day ranging from 00-23 in the timezone configured for the account. This value is also corrected for daylight savings time.
EventCategory StringTrue True The category of the event.
EventAction StringTrue The action of the event.
EventLabel StringTrue The label of the event.
TotalEvents IntegerFalse True The total number of events for the profile, across all categories.
UniqueEvents IntegerFalse True The total number of unique events for the profile, across all categories.
EventValue LongFalse True The total value of events for the profile.
SessionsWithEvent IntegerFalse True The total number of sessions with events.
AvgEventValue DoubleFalse True The average value of an event.
EventsPerSessionWithEvent DoubleFalse True The average number of events per session with event.
StartDate StringStart date for fetching Analytics data. Either a date string or a relative date (e.g., today, yesterday, or #daysAgo).
EndDate StringEnd date for fetching Analytics data. Either a date string or a relative date (e.g., today, yesterday, or #daysAgo).
Dimensions StringA comma-separated list of dimensions to retrieve in addition to the columns defined in the schema. Set to empty string to retrieve no dimensions.
Metrics StringA comma-separated list of metrics to retrieve in addition to the columns defined in the schema.
CohortTypes StringAvailable only when using the V4 API. A comma-separated list of cohort types. The default value is FIRST_VISIT_DATE
CohortStartDates DateAvailable only when using the V4 API. A comma-separated list of cohort start dates.
CohortEndDates DateAvailable only when using the V4 API. A comma-separated list of cohort end dates.
SamplesReadCounts StringComma separated list of samples read counts when the response data is sampled.
SamplingSpaceSizes StringComma separated list of samples space sizes counts when the response data is sampled.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Segments StringSegments the data returned for your request. Either a SegmentId or a custom segment.
Profile StringThe Profile ID or website URL to retrieve data from.