Documentation ¶
Overview ¶
Package analytics provides access to the Google Analytics API.
See https://developers.google.com/analytics/
Usage example:
import "github.com/zippoxer/google-api-go-client/analytics/v2.4" ... analyticsService, err := analytics.New(oauthHttpClient)
Index ¶
- Constants
- type DataGetCall
- func (c *DataGetCall) Context(ctx context.Context) *DataGetCall
- func (c *DataGetCall) Dimensions(dimensions string) *DataGetCall
- func (c *DataGetCall) Do() error
- func (c *DataGetCall) Fields(s ...googleapi.Field) *DataGetCall
- func (c *DataGetCall) Filters(filters string) *DataGetCall
- func (c *DataGetCall) IfNoneMatch(entityTag string) *DataGetCall
- func (c *DataGetCall) MaxResults(maxResults int64) *DataGetCall
- func (c *DataGetCall) QuotaUser(quotaUser string) *DataGetCall
- func (c *DataGetCall) Segment(segment string) *DataGetCall
- func (c *DataGetCall) Sort(sort string) *DataGetCall
- func (c *DataGetCall) StartIndex(startIndex int64) *DataGetCall
- func (c *DataGetCall) UserIP(userIP string) *DataGetCall
- type DataService
- type ManagementAccountsListCall
- func (c *ManagementAccountsListCall) Context(ctx context.Context) *ManagementAccountsListCall
- func (c *ManagementAccountsListCall) Do() error
- func (c *ManagementAccountsListCall) Fields(s ...googleapi.Field) *ManagementAccountsListCall
- func (c *ManagementAccountsListCall) IfNoneMatch(entityTag string) *ManagementAccountsListCall
- func (c *ManagementAccountsListCall) MaxResults(maxResults int64) *ManagementAccountsListCall
- func (c *ManagementAccountsListCall) QuotaUser(quotaUser string) *ManagementAccountsListCall
- func (c *ManagementAccountsListCall) StartIndex(startIndex int64) *ManagementAccountsListCall
- func (c *ManagementAccountsListCall) UserIP(userIP string) *ManagementAccountsListCall
- type ManagementAccountsService
- type ManagementGoalsListCall
- func (c *ManagementGoalsListCall) Context(ctx context.Context) *ManagementGoalsListCall
- func (c *ManagementGoalsListCall) Do() error
- func (c *ManagementGoalsListCall) Fields(s ...googleapi.Field) *ManagementGoalsListCall
- func (c *ManagementGoalsListCall) IfNoneMatch(entityTag string) *ManagementGoalsListCall
- func (c *ManagementGoalsListCall) MaxResults(maxResults int64) *ManagementGoalsListCall
- func (c *ManagementGoalsListCall) QuotaUser(quotaUser string) *ManagementGoalsListCall
- func (c *ManagementGoalsListCall) StartIndex(startIndex int64) *ManagementGoalsListCall
- func (c *ManagementGoalsListCall) UserIP(userIP string) *ManagementGoalsListCall
- type ManagementGoalsService
- type ManagementProfilesListCall
- func (c *ManagementProfilesListCall) Context(ctx context.Context) *ManagementProfilesListCall
- func (c *ManagementProfilesListCall) Do() error
- func (c *ManagementProfilesListCall) Fields(s ...googleapi.Field) *ManagementProfilesListCall
- func (c *ManagementProfilesListCall) IfNoneMatch(entityTag string) *ManagementProfilesListCall
- func (c *ManagementProfilesListCall) MaxResults(maxResults int64) *ManagementProfilesListCall
- func (c *ManagementProfilesListCall) QuotaUser(quotaUser string) *ManagementProfilesListCall
- func (c *ManagementProfilesListCall) StartIndex(startIndex int64) *ManagementProfilesListCall
- func (c *ManagementProfilesListCall) UserIP(userIP string) *ManagementProfilesListCall
- type ManagementProfilesService
- type ManagementSegmentsListCall
- func (c *ManagementSegmentsListCall) Context(ctx context.Context) *ManagementSegmentsListCall
- func (c *ManagementSegmentsListCall) Do() error
- func (c *ManagementSegmentsListCall) Fields(s ...googleapi.Field) *ManagementSegmentsListCall
- func (c *ManagementSegmentsListCall) IfNoneMatch(entityTag string) *ManagementSegmentsListCall
- func (c *ManagementSegmentsListCall) MaxResults(maxResults int64) *ManagementSegmentsListCall
- func (c *ManagementSegmentsListCall) QuotaUser(quotaUser string) *ManagementSegmentsListCall
- func (c *ManagementSegmentsListCall) StartIndex(startIndex int64) *ManagementSegmentsListCall
- func (c *ManagementSegmentsListCall) UserIP(userIP string) *ManagementSegmentsListCall
- type ManagementSegmentsService
- type ManagementService
- type ManagementWebpropertiesListCall
- func (c *ManagementWebpropertiesListCall) Context(ctx context.Context) *ManagementWebpropertiesListCall
- func (c *ManagementWebpropertiesListCall) Do() error
- func (c *ManagementWebpropertiesListCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesListCall
- func (c *ManagementWebpropertiesListCall) IfNoneMatch(entityTag string) *ManagementWebpropertiesListCall
- func (c *ManagementWebpropertiesListCall) MaxResults(maxResults int64) *ManagementWebpropertiesListCall
- func (c *ManagementWebpropertiesListCall) QuotaUser(quotaUser string) *ManagementWebpropertiesListCall
- func (c *ManagementWebpropertiesListCall) StartIndex(startIndex int64) *ManagementWebpropertiesListCall
- func (c *ManagementWebpropertiesListCall) UserIP(userIP string) *ManagementWebpropertiesListCall
- type ManagementWebpropertiesService
- type Service
Constants ¶
const ( // View and manage your Google Analytics data AnalyticsScope = "https://www.googleapis.com/auth/analytics" // View your Google Analytics data AnalyticsReadonlyScope = "https://www.googleapis.com/auth/analytics.readonly" )
OAuth2 scopes used by this API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataGetCall ¶
type DataGetCall struct {
// contains filtered or unexported fields
}
func (*DataGetCall) Context ¶
func (c *DataGetCall) Context(ctx context.Context) *DataGetCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*DataGetCall) Dimensions ¶
func (c *DataGetCall) Dimensions(dimensions string) *DataGetCall
Dimensions sets the optional parameter "dimensions": A comma-separated list of Analytics dimensions. E.g., 'ga:browser,ga:city'.
func (*DataGetCall) Do ¶
func (c *DataGetCall) Do() error
Do executes the "analytics.data.get" call.
func (*DataGetCall) Fields ¶
func (c *DataGetCall) Fields(s ...googleapi.Field) *DataGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*DataGetCall) Filters ¶
func (c *DataGetCall) Filters(filters string) *DataGetCall
Filters sets the optional parameter "filters": A comma-separated list of dimension or metric filters to be applied to the report data.
func (*DataGetCall) IfNoneMatch ¶
func (c *DataGetCall) IfNoneMatch(entityTag string) *DataGetCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
func (*DataGetCall) MaxResults ¶
func (c *DataGetCall) MaxResults(maxResults int64) *DataGetCall
MaxResults sets the optional parameter "max-results": The maximum number of entries to include in this feed.
func (*DataGetCall) QuotaUser ¶
func (c *DataGetCall) QuotaUser(quotaUser string) *DataGetCall
QuotaUser sets the optional parameter "quotaUser": Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
func (*DataGetCall) Segment ¶
func (c *DataGetCall) Segment(segment string) *DataGetCall
Segment sets the optional parameter "segment": An Analytics advanced segment to be applied to the report data.
func (*DataGetCall) Sort ¶
func (c *DataGetCall) Sort(sort string) *DataGetCall
Sort sets the optional parameter "sort": A comma-separated list of dimensions or metrics that determine the sort order for the report data.
func (*DataGetCall) StartIndex ¶
func (c *DataGetCall) StartIndex(startIndex int64) *DataGetCall
StartIndex sets the optional parameter "start-index": An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
func (*DataGetCall) UserIP ¶
func (c *DataGetCall) UserIP(userIP string) *DataGetCall
UserIP sets the optional parameter "userIp": IP address of the site where the request originates. Use this if you want to enforce per-user limits.
type DataService ¶
type DataService struct {
// contains filtered or unexported fields
}
func NewDataService ¶
func NewDataService(s *Service) *DataService
func (*DataService) Get ¶
func (r *DataService) Get(ids string, startDate string, endDate string, metrics string) *DataGetCall
Get: Returns Analytics report data for a view (profile).
type ManagementAccountsListCall ¶
type ManagementAccountsListCall struct {
// contains filtered or unexported fields
}
func (*ManagementAccountsListCall) Context ¶
func (c *ManagementAccountsListCall) Context(ctx context.Context) *ManagementAccountsListCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ManagementAccountsListCall) Do ¶
func (c *ManagementAccountsListCall) Do() error
Do executes the "analytics.management.accounts.list" call.
func (*ManagementAccountsListCall) Fields ¶
func (c *ManagementAccountsListCall) Fields(s ...googleapi.Field) *ManagementAccountsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ManagementAccountsListCall) IfNoneMatch ¶
func (c *ManagementAccountsListCall) IfNoneMatch(entityTag string) *ManagementAccountsListCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
func (*ManagementAccountsListCall) MaxResults ¶
func (c *ManagementAccountsListCall) MaxResults(maxResults int64) *ManagementAccountsListCall
MaxResults sets the optional parameter "max-results": The maximum number of accounts to include in this response.
func (*ManagementAccountsListCall) QuotaUser ¶
func (c *ManagementAccountsListCall) QuotaUser(quotaUser string) *ManagementAccountsListCall
QuotaUser sets the optional parameter "quotaUser": Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
func (*ManagementAccountsListCall) StartIndex ¶
func (c *ManagementAccountsListCall) StartIndex(startIndex int64) *ManagementAccountsListCall
StartIndex sets the optional parameter "start-index": An index of the first account to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
func (*ManagementAccountsListCall) UserIP ¶
func (c *ManagementAccountsListCall) UserIP(userIP string) *ManagementAccountsListCall
UserIP sets the optional parameter "userIp": IP address of the site where the request originates. Use this if you want to enforce per-user limits.
type ManagementAccountsService ¶
type ManagementAccountsService struct {
// contains filtered or unexported fields
}
func NewManagementAccountsService ¶
func NewManagementAccountsService(s *Service) *ManagementAccountsService
func (*ManagementAccountsService) List ¶
func (r *ManagementAccountsService) List() *ManagementAccountsListCall
List: Lists all accounts to which the user has access.
type ManagementGoalsListCall ¶
type ManagementGoalsListCall struct {
// contains filtered or unexported fields
}
func (*ManagementGoalsListCall) Context ¶
func (c *ManagementGoalsListCall) Context(ctx context.Context) *ManagementGoalsListCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ManagementGoalsListCall) Do ¶
func (c *ManagementGoalsListCall) Do() error
Do executes the "analytics.management.goals.list" call.
func (*ManagementGoalsListCall) Fields ¶
func (c *ManagementGoalsListCall) Fields(s ...googleapi.Field) *ManagementGoalsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ManagementGoalsListCall) IfNoneMatch ¶
func (c *ManagementGoalsListCall) IfNoneMatch(entityTag string) *ManagementGoalsListCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
func (*ManagementGoalsListCall) MaxResults ¶
func (c *ManagementGoalsListCall) MaxResults(maxResults int64) *ManagementGoalsListCall
MaxResults sets the optional parameter "max-results": The maximum number of goals to include in this response.
func (*ManagementGoalsListCall) QuotaUser ¶
func (c *ManagementGoalsListCall) QuotaUser(quotaUser string) *ManagementGoalsListCall
QuotaUser sets the optional parameter "quotaUser": Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
func (*ManagementGoalsListCall) StartIndex ¶
func (c *ManagementGoalsListCall) StartIndex(startIndex int64) *ManagementGoalsListCall
StartIndex sets the optional parameter "start-index": An index of the first goal to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
func (*ManagementGoalsListCall) UserIP ¶
func (c *ManagementGoalsListCall) UserIP(userIP string) *ManagementGoalsListCall
UserIP sets the optional parameter "userIp": IP address of the site where the request originates. Use this if you want to enforce per-user limits.
type ManagementGoalsService ¶
type ManagementGoalsService struct {
// contains filtered or unexported fields
}
func NewManagementGoalsService ¶
func NewManagementGoalsService(s *Service) *ManagementGoalsService
func (*ManagementGoalsService) List ¶
func (r *ManagementGoalsService) List(accountId string, webPropertyId string, profileId string) *ManagementGoalsListCall
List: Lists goals to which the user has access.
type ManagementProfilesListCall ¶
type ManagementProfilesListCall struct {
// contains filtered or unexported fields
}
func (*ManagementProfilesListCall) Context ¶
func (c *ManagementProfilesListCall) Context(ctx context.Context) *ManagementProfilesListCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ManagementProfilesListCall) Do ¶
func (c *ManagementProfilesListCall) Do() error
Do executes the "analytics.management.profiles.list" call.
func (*ManagementProfilesListCall) Fields ¶
func (c *ManagementProfilesListCall) Fields(s ...googleapi.Field) *ManagementProfilesListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ManagementProfilesListCall) IfNoneMatch ¶
func (c *ManagementProfilesListCall) IfNoneMatch(entityTag string) *ManagementProfilesListCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
func (*ManagementProfilesListCall) MaxResults ¶
func (c *ManagementProfilesListCall) MaxResults(maxResults int64) *ManagementProfilesListCall
MaxResults sets the optional parameter "max-results": The maximum number of views (profiles) to include in this response.
func (*ManagementProfilesListCall) QuotaUser ¶
func (c *ManagementProfilesListCall) QuotaUser(quotaUser string) *ManagementProfilesListCall
QuotaUser sets the optional parameter "quotaUser": Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
func (*ManagementProfilesListCall) StartIndex ¶
func (c *ManagementProfilesListCall) StartIndex(startIndex int64) *ManagementProfilesListCall
StartIndex sets the optional parameter "start-index": An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
func (*ManagementProfilesListCall) UserIP ¶
func (c *ManagementProfilesListCall) UserIP(userIP string) *ManagementProfilesListCall
UserIP sets the optional parameter "userIp": IP address of the site where the request originates. Use this if you want to enforce per-user limits.
type ManagementProfilesService ¶
type ManagementProfilesService struct {
// contains filtered or unexported fields
}
func NewManagementProfilesService ¶
func NewManagementProfilesService(s *Service) *ManagementProfilesService
func (*ManagementProfilesService) List ¶
func (r *ManagementProfilesService) List(accountId string, webPropertyId string) *ManagementProfilesListCall
List: Lists views (profiles) to which the user has access.
type ManagementSegmentsListCall ¶
type ManagementSegmentsListCall struct {
// contains filtered or unexported fields
}
func (*ManagementSegmentsListCall) Context ¶
func (c *ManagementSegmentsListCall) Context(ctx context.Context) *ManagementSegmentsListCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ManagementSegmentsListCall) Do ¶
func (c *ManagementSegmentsListCall) Do() error
Do executes the "analytics.management.segments.list" call.
func (*ManagementSegmentsListCall) Fields ¶
func (c *ManagementSegmentsListCall) Fields(s ...googleapi.Field) *ManagementSegmentsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ManagementSegmentsListCall) IfNoneMatch ¶
func (c *ManagementSegmentsListCall) IfNoneMatch(entityTag string) *ManagementSegmentsListCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
func (*ManagementSegmentsListCall) MaxResults ¶
func (c *ManagementSegmentsListCall) MaxResults(maxResults int64) *ManagementSegmentsListCall
MaxResults sets the optional parameter "max-results": The maximum number of advanced segments to include in this response.
func (*ManagementSegmentsListCall) QuotaUser ¶
func (c *ManagementSegmentsListCall) QuotaUser(quotaUser string) *ManagementSegmentsListCall
QuotaUser sets the optional parameter "quotaUser": Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
func (*ManagementSegmentsListCall) StartIndex ¶
func (c *ManagementSegmentsListCall) StartIndex(startIndex int64) *ManagementSegmentsListCall
StartIndex sets the optional parameter "start-index": An index of the first advanced segment to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
func (*ManagementSegmentsListCall) UserIP ¶
func (c *ManagementSegmentsListCall) UserIP(userIP string) *ManagementSegmentsListCall
UserIP sets the optional parameter "userIp": IP address of the site where the request originates. Use this if you want to enforce per-user limits.
type ManagementSegmentsService ¶
type ManagementSegmentsService struct {
// contains filtered or unexported fields
}
func NewManagementSegmentsService ¶
func NewManagementSegmentsService(s *Service) *ManagementSegmentsService
func (*ManagementSegmentsService) List ¶
func (r *ManagementSegmentsService) List() *ManagementSegmentsListCall
List: Lists advanced segments to which the user has access.
type ManagementService ¶
type ManagementService struct { Accounts *ManagementAccountsService Goals *ManagementGoalsService Profiles *ManagementProfilesService Segments *ManagementSegmentsService Webproperties *ManagementWebpropertiesService // contains filtered or unexported fields }
func NewManagementService ¶
func NewManagementService(s *Service) *ManagementService
type ManagementWebpropertiesListCall ¶
type ManagementWebpropertiesListCall struct {
// contains filtered or unexported fields
}
func (*ManagementWebpropertiesListCall) Context ¶
func (c *ManagementWebpropertiesListCall) Context(ctx context.Context) *ManagementWebpropertiesListCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ManagementWebpropertiesListCall) Do ¶
func (c *ManagementWebpropertiesListCall) Do() error
Do executes the "analytics.management.webproperties.list" call.
func (*ManagementWebpropertiesListCall) Fields ¶
func (c *ManagementWebpropertiesListCall) Fields(s ...googleapi.Field) *ManagementWebpropertiesListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ManagementWebpropertiesListCall) IfNoneMatch ¶
func (c *ManagementWebpropertiesListCall) IfNoneMatch(entityTag string) *ManagementWebpropertiesListCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
func (*ManagementWebpropertiesListCall) MaxResults ¶
func (c *ManagementWebpropertiesListCall) MaxResults(maxResults int64) *ManagementWebpropertiesListCall
MaxResults sets the optional parameter "max-results": The maximum number of web properties to include in this response.
func (*ManagementWebpropertiesListCall) QuotaUser ¶
func (c *ManagementWebpropertiesListCall) QuotaUser(quotaUser string) *ManagementWebpropertiesListCall
QuotaUser sets the optional parameter "quotaUser": Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
func (*ManagementWebpropertiesListCall) StartIndex ¶
func (c *ManagementWebpropertiesListCall) StartIndex(startIndex int64) *ManagementWebpropertiesListCall
StartIndex sets the optional parameter "start-index": An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
func (*ManagementWebpropertiesListCall) UserIP ¶
func (c *ManagementWebpropertiesListCall) UserIP(userIP string) *ManagementWebpropertiesListCall
UserIP sets the optional parameter "userIp": IP address of the site where the request originates. Use this if you want to enforce per-user limits.
type ManagementWebpropertiesService ¶
type ManagementWebpropertiesService struct {
// contains filtered or unexported fields
}
func NewManagementWebpropertiesService ¶
func NewManagementWebpropertiesService(s *Service) *ManagementWebpropertiesService
func (*ManagementWebpropertiesService) List ¶
func (r *ManagementWebpropertiesService) List(accountId string) *ManagementWebpropertiesListCall
List: Lists web properties to which the user has access.