Cmdlets for Google Analytics

Build 24.0.9060

Data Model

The CData Cmdlets PowerShell Module for Google Analytics models Google Analytics entities in relational Tables, Views, and Stored Procedures. The provided tables will give you an overview of your account information and the profiles available for Google Analytics queries. Google Analytics allows for Dimensions and Metrics to be queried in a large number of arrangements. Some sample views are provided based on common Google Analytics reports. You can, however, also create your own custom views based on any combination of Dimensions and Metrics you need.

API limitations and requirements are documented in this section; you can use the SupportEnhancedSQL feature, set by default, to circumvent most of these limitations.

Create Additional Schemas

The CreateCustomSchema stored procedure can be used to easily generate new schema files with a custom combination of Dimensions and Metrics. This procedure takes the TableName and a comma-separated lists of Dimensions and Metrics and builds a schema file that can be read by the cmdlet. Each Dimension or Metric in the list takes the name of the value from Google Analytics (without the 'ga:' prefix). For example:

Dimensions=UserType,SessionCount

Metrics=Users,PercentNewSessions
If the Location connection property is set, the file will be output to that folder. Otherwise, the OutputFolder input can be used to specify an output folder. To begin querying these new files, simply set the Location connection property to the folder containing these new schema files.

Using Google Analytics 4 API

See GoogleAnalytics4 Data Model for the available entities in the Google Analytics 4 API.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060