ODBC Driver for Google Analytics

Build 22.0.8509

AdWords

Retrieves AdWords data.

Table Specific Information

Select

Google Analytics only allows up to 10 Metrics and 7 Dimensions in a single query. Therefore, when issuing a query that selects all columns, only the default Metric columns will be selected for tables with more than 10 Metrics. The default Dimensions will be used unless you explicitly select other dimension columns. The following query uses Keyword instead of the default Campaign dimension:

SELECT Keyword, Sessions, Impressions, AdClicks, AdCost, CTR, CPC, RPC, ROI, Margin FROM AdWords
Filters can also be used in the WHERE clause. Dimension fields support the =, !=, LIKE, and NOT LIKE operators. Metric fields support =, !=, >, >=, <, and <= operators. This query will find the total number of AdClicks from the United States:
SELECT Country, AdClicks FROM AdWords WHERE Country = 'United States'
All reports in Google Analytics must cover a specific date range. The default behavior is to pull the last month of data if the StartDate and EndDate inputs are left unset. To override this behavior, the values can be set directly in the query. For example:
SELECT * FROM AdWords WHERE StartDate = '90daysAgo' AND EndDate = 'Today'
Because there are more than 10 Metrics available for the AdWords table, a query that selects all columns only returns the default Metrics for this table (see columns marked as default Metrics below). If you need to select other Metrics, select them explicitly instead of using '*'. The default dimension for the table will be used unless another dimension is specified in the select columns, the DefaultFilter, or the Dimensions column in the WHERE clause. See Retrieving Google Analytics Data for more information about SELECT * queries. The following queries return the same results:
SELECT Campaign, Sessions, Impressions, AdClicks, AdCost, CTR, CPC, RPC, ROI, Margin FROM AdWords

Columns

Name Type Dimension DefaultMetric DefaultDimension Description
Date Date True The date of the session formatted as YYYYMMDD.
Year Integer True The year of the session. A four-digit year from 2005 to the current year.
Month Integer True The month of the session. An integer from 01 to 12.
Week Integer True The week of the session. A number from 01 to 53. Each week starts on Sunday.
Day Integer True The day of the month. A number from 01 to 31.
Hour Integer True An hour of the day ranging from 00-23 in the timezone configured for the account. This value is also corrected for daylight savings time.
Language String True The language provided by the HTTP Request for the browser. Values are given as an ISO-639 code.
Country String True The country of users, derived from IP addresses.
City String True The cities of property users, derived from IP addresses.
Browser String True The names of browsers used by users to your website. For example, Internet Explorer or Firefox.
OperatingSystem String True The operating system used by your users. For example, Windows, Linux , Macintosh, iPhone, iPod.
DeviceCategory String True The type of device: desktop, tablet, or mobile.
Campaign String True True When using manual campaign tracking, this value is the value of the utm_campaign campaign tracking parameter. When using AdWords autotagging, this value is the name(s) of the online ad campaign that you use for your property. Otherwise, this value is: not set.
AdGroup String True The name of your AdWords ad group.
Keyword String True When using manual campaign tracking, this value is the value of the utm_term campaign tracking parameter; i.e., the keywords used by users to reach your property when using AdWords autotagging or if a user used organic search to reach your property. Otherwise this value is: not set.
Sessions Integer False True Counts the total number of sessions.
Impressions Integer False True Total number of campaign impressions.
AdClicks Integer False True The total number of times users have clicked on an ad to reach your property.
AdCost Decimal False True Derived cost for the advertising campaign. The currency for this value is based on the currency that you set in your AdWords account.
CTR Double False True Click-through rate for your ad. This is equal to the number of clicks divided by the number of impressions for your ad (e.g., how many times users clicked on one of your ads where that ad appeared).
CPC Decimal False True Cost to advertiser per click.
RPC Decimal False True RPC, or revenue-per-click, is the average revenue from e-commerce sales and/or goal value you received for each click on one of your search ads.
ROI Decimal False True Returns on Investment is overall transaction profit divided by derived advertising cost.
Margin Decimal False True The overall transaction profit margin.
PercentNewSessions Double False The percentage of sessions by people who had never visited your property before.
NewUsers Integer False The number of users whose visit to your property was marked as a first-time session.
BounceRate Double False The percentage of single-page session.
PageviewsPerSession Double False The average number of pages viewed during a session on your property.
AvgSessionDuration Double False The average duration of user sessions represented in total seconds.
GoalConversionRateAll Double False The percentage of sessions that resulted in a conversion to at least one of your goals.
Transactions Integer False The total number of transactions.
RevenuePerTransaction Decimal False The average revenue for an e-commerce transaction.
TransactionRevenue Decimal False The total sale revenue provided in the transaction, excluding shipping and tax.
TransactionRevenuePerSession Decimal False Average transaction revenue for a session on your property.
StartDate String Start date for fetching Analytics data. Either a date string or a relative date (e.g., today, yesterday, or #daysAgo).
EndDate String End date for fetching Analytics data. Either a date string or a relative date (e.g., today, yesterday, or #daysAgo).
Dimensions String A comma-separated list of dimensions to retrieve in addition to the columns defined in the schema. Set to empty string to retrieve no dimensions.
Metrics String A comma-separated list of metrics to retrieve in addition to the columns defined in the schema.
CohortTypes String Available only when using the V4 API. A comma-separated list of cohort types. The default value is FIRST_VISIT_DATE
CohortStartDates Date Available only when using the V4 API. A comma-separated list of cohort start dates.
CohortEndDates Date Available only when using the V4 API. A comma-separated list of cohort end dates.
SamplesReadCounts String Comma separated list of samples read counts when the response data is sampled.
SamplingSpaceSizes String Comma separated list of samples space sizes counts when the response data is sampled.
Profile Integer Profile ID or website URL to retrieve data from.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Segments String Segments the data returned for your request. Either a SegmentId or a custom segment.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8509