class DataGa extends Resource (View source)

The "ga" collection of methods.

Typical usage is:

 $analyticsService = new Google\Service\Analytics(...);
 $ga = $analyticsService->data_ga;

Methods

get(string $ids, string $startDate, string $endDate, string $metrics, array $optParams = [])

Returns Analytics data for a view (profile). (ga.get)

Details

GaData get(string $ids, string $startDate, string $endDate, string $metrics, array $optParams = [])

Returns Analytics data for a view (profile). (ga.get)

Parameters

string $ids

Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics view (profile) ID.

string $startDate

Start date for fetching Analytics data. Requests can specify a start date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is 7daysAgo.

string $endDate

End date for fetching Analytics data. Request can should specify an end date formatted as YYYY-MM-DD, or as a relative date (e.g., today, yesterday, or 7daysAgo). The default value is yesterday.

string $metrics

A comma-separated list of Analytics metrics. E.g., 'ga:sessions,ga:pageviews'. At least one metric must be specified.

array $optParams

Optional parameters.

Return Value

GaData

Exceptions

Exception