Table of Contents

Class GoogleAnalyticsDataProvider

Namespace
combit.Reporting.DataProviders
Assembly
combit.ListLabel31.CrossPlatform.dll

Provides a data provider for Google Analytics.

public sealed class GoogleAnalyticsDataProvider : IDataProvider, ISupportsLogger
Inheritance
GoogleAnalyticsDataProvider
Implements
Inherited Members

Remarks

This provider uses Google Analytics API queries to retrieve data and exposes them as tables.

Constructors

GoogleAnalyticsDataProvider(string, string, string)

Initializes a new instance of the GoogleAnalyticsDataProvider class.

public GoogleAnalyticsDataProvider(string refreshToken, string clientId, string clientSecret)

Parameters

refreshToken string

The refresh token for authentication.

clientId string

The client identifier.

clientSecret string

The client secret.

Properties

ClientId

Gets the client identifier.

public string ClientId { get; }

Property Value

string

RefreshToken

Gets the refresh token used for authentication.

public string RefreshToken { get; }

Property Value

string

RowsPerDataRequest

Gets or sets the maximum number of rows per data request.

public int RowsPerDataRequest { get; set; }

Property Value

int

Methods

AddQuery(string, string[], string, string, string[], string[]?, string[]?, string?, string?, string?, string?, string?)

Adds a new Google Analytics query to the provider.

public void AddQuery(string tableName, string[] ids, string startDate, string endDate, string[] metrics, string[]? dimensions = null, string[]? sort = null, string? filters = null, string? segment = null, string? samplingLevel = null, string? startIndex = null, string? maxResult = null)

Parameters

tableName string

The name of the table that will be created from the query results.

ids string[]

The IDs for the query.

startDate string

The start date for the query.

endDate string

The end date for the query.

metrics string[]

The metrics to retrieve.

dimensions string[]

Optional dimensions for the query.

sort string[]

Optional sort order for the query.

filters string

Optional filters for the query.

segment string

Optional segment for the query.

samplingLevel string

Optional sampling level for the query.

startIndex string

Optional starting index for the query.

maxResult string

Optional maximum result count for the query.

Exceptions

ListLabelException

Thrown if tableName is empty.