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
refreshTokenstringThe refresh token for authentication.
clientIdstringThe client identifier.
clientSecretstringThe client secret.
Properties
ClientId
Gets the client identifier.
public string ClientId { get; }
Property Value
RefreshToken
Gets the refresh token used for authentication.
public string RefreshToken { get; }
Property Value
RowsPerDataRequest
Gets or sets the maximum number of rows per data request.
public int RowsPerDataRequest { get; set; }
Property Value
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
tableNamestringThe name of the table that will be created from the query results.
idsstring[]The IDs for the query.
startDatestringThe start date for the query.
endDatestringThe end date for the query.
metricsstring[]The metrics to retrieve.
dimensionsstring[]Optional dimensions for the query.
sortstring[]Optional sort order for the query.
filtersstringOptional filters for the query.
segmentstringOptional segment for the query.
samplingLevelstringOptional sampling level for the query.
startIndexstringOptional starting index for the query.
maxResultstringOptional maximum result count for the query.
Exceptions
- ListLabelException
Thrown if
tableNameis empty.