Google Analytics Data Connector
The Google Analytics Data API gives you programmatic access to Google Analytics 4 (GA4) report data.
Pre-requisites
You need the
privateKeyId
,privateKey
,authType
,timeout
,clientEmail
,clientId
parameters.
How to Connect
To connect the Google Analytics Data connector, you need to deploy the connector (if not already deployed) and configure the connection.
To check if the connector is already deployed, run this command:
SELECT "deployed" FROM "SYSADMIN.ModularConnectors" WHERE "name" = 'google-analytics-data';;
Deploy the connector using the
SYSADMIN.deployModularConnector
procedure:
CALL "SYSADMIN.deployModularConnector"(
"name" => 'google-analytics-data',
"deploy" => true
);;
Configure the connection using the
SYSADMIN.createConnection()
procedure.
The connection can be created in several ways:
via client email and private key:
CALL SYSADMIN.createConnection ( name => 'analytics_data_ds' ,jbossCLITemplateName => 'ga4' ,connectionOrResourceAdapterProperties => 'timeout=<timeout>,authType=<authType>,privateKeyId=<privateKeyId>,privateKey=<privateKey>,clientEmail=<clientEmail>,clientId=<clientId>');;
CALL SYSADMIN.createDataSource ( name => 'analytics_data_ds' ,translator => 'analytics_data' ,modelProperties => '' ,translatorProperties => '');;
via OAuth2 providing a
refreshToken
:
CALL SYSADMIN.createConnection("name" => 'analytics_data_ds', "jbossCLITemplateName" => 'ga4', "connectionOrResourceAdapterProperties" => 'authType="authorized_user",clientSecret=<client secret>,refreshToken=<refresh token>,clientId=<client Id>,timeout=100') ;;
CALL SYSADMIN.createDataSource("name" => 'analytics_data_ds', "translator" => 'ga4', "modelProperties" => '', "translatorProperties" => '', "encryptedModelProperties" => '', "encryptedTranslatorProperties" => '') ;;
via OAuth2 providing an
authCode
andredirectUri
:
CALL SYSADMIN.createConnection("name" => 'analytics_data_ds', "jbossCLITemplateName" => 'ga4', "connectionOrResourceAdapterProperties" => 'authType="authorized_user",clientSecret=<client secret>,clientId=<client Id>,authCode=<auth code>,redirectUri=<redirect URI>,timeout=100') ;;
CALL SYSADMIN.createDataSource("name" => 'analytics_data_ds', "translator" => 'ga4', "modelProperties" => '', "translatorProperties" => '', "encryptedModelProperties" => '', "encryptedTranslatorProperties" => '') ;;
'No translator found with the specified name' Error
If the modular connector has not been deployed before running the SYSADMIN.createDataSource connection, you will see the following error message:
Message from SYSADMIN.createDataSource: No translator found with the specified name: ...
In this case, deploy the connector as described in Step 1 above.
Usage
Select the metrics and dimensions you need. Use the CreateProcedure_ReplicateData
procedure to create your own data retrieval procedure.
Available Dimensions
API Name | UI Name |
---|---|
| Achievement ID |
| Ad format |
| Ad source |
| Ad unit |
| App version |
| Audience ID |
| Audience name |
| Interests |
| Browser |
| Campaign ID |
| Campaign |
| Character |
| City |
| City ID |
cm360AccountId | The CM360 Account ID that led to the key event. Identifies the CM360 Account. |
cm360AccountName | The CM360 Account Name that led to the key event. A CM360 account consists of advertisers, sites, campaigns, and user profiles. |
cm360AdvertiserId | The CM360 Advertiser ID that led to the key event. A CM360 Advertiser contains a group of campaigns, creative assets, and other settings. |
cm360AdvertiserName | The CM360 Advertiser Name that led to the key event. A CM360 Advertiser contains a group of campaigns, creative assets, and other settings. |
cm360CampaignId | The CM360 Campaign ID that led to the key event. A CM360 campaign can be configured to specify when your ads run, what landing pages are used, and other properties. |
cm360CampaignName | The CM360 Campaign Name that led to the key event. A CM360 campaign can be configured to specify when your ads run, what landing pages are used, and other properties. |
cm360CreativeFormat | The CM360 Creative Format that led to the key event. CM360 creative formats are also referred to as creative types. |
cm360CreativeId | The CM360 Creative ID that led to the key event. Identifies a CM360 creative. |
cm360CreativeName | The CM360 Creative Name that led to the key event. The name given to a CM360 creative. |
cm360CreativeType | The CM360 Creative Type that led to the key event. A category of CM360 creatives like 'Display' or 'Tracking'. To learn more, see manage creatives |
cm360CreativeTypeId | The CM360 Creative Type ID that led to the key event. Identifies a CM360 creative type. |
cm360CreativeVersion | The CM360 Creative Version that led to the key event. The version number helps you keep track of multiple versions of your creative in your reports. If you upload a new asset to an existing creative, the version number is increased by one. |
cm360Medium | The CM360 Medium that led to the key event. The CM360 medium is also referred to as the placement cost structure. |
cm360PlacementCostStructure | The CM360 Placement Cost Structure that led to the key event. Placement cost structures regulate how media cost will be calculated. For example 'CPM'. |
cm360PlacementId | The CM360 Placement ID that led to the key event. Identifies a CM360 placement. A placement is the part of a website where your ad appears. |
cm360PlacementName | The CM360 Placement Name that led to the key event. The given name for a CM360 placement. A placement is the part of a website where your ad appears. |
cm360RenderingId | The CM360 Rendering ID that led to the key event. Identifies a CM360 creative. |
cm360SiteId | The CM360 Site ID that led to the key event. Identifies a CM360 site. |
cm360SiteName | The CM360 Site Name that led to the key event. The CM360 Site name from which the ad space was purchased. |
cm360Source | The CM360 Source that led to the key event. The CM360 source is also referred to as the site name. |
cm360SourceMedium | The CM360 Source Medium that led to the key event. A combination of the source and medium. |
| The cohort's name in the request. A cohort is a set of users who started using your website or app in any consecutive group of days. If a cohort name is not specified in the request, cohorts are named by their zero based index such as cohort_0 and cohort_1. |
| Daily cohort |
| Monthly cohort |
| Weekly cohort |
comparison | Comparisons enable you to evaluate subsets of your data side by side. For report requests, the comparisons column is automatically added to the response. For pivot report requests, the requested dimension must be used. |
| Content group |
| Content ID |
| Content type |
| Continent |
| Continent ID |
| Country |
| Country ID |
currencyCode | The local currency code (based on ISO 4217 standard) of the eCommerce event. For example, |
| Date |
| Date + hour (YYYYMMDDHH) |
| Date hour and minute |
| Day |
| Day of week |
| Day of week name |
| Default channel group |
| Device category |
| Device model |
dv360AdvertiserId | The DV360 Advertiser ID that led to the key event. Identifies the DV360 advertiser. |
dv360AdvertiserName | The DV360 Advertiser Name that led to the key event. DV360 advertisers represent real-life businesses that run advertising campaigns. |
dv360CampaignId | The DV360 Campaign ID that led to the key event. Identifies the DV360 campaign. |
dv360CampaignName | The DV360 Campaign Name that led to the key event. DV360 campaigns group together related insertion orders with a common business goal. |
dv360CreativeFormat | The DV360 Creative Format that led to the key event. Also referred to as the creative type. For example, expandable, video, or native. |
dv360CreativeId | The DV360 Creative ID that led to the key event. Identifies the DV360 creative. |
dv360CreativeName | The DV360 Creative Name that led to the key event. The name given to a DV360 creative. |
dv360ExchangeId | The DV360 Exchange ID that led to the key event. Identifies the DV360 exchange. |
dv360ExchangeName | The DV360 Exchange Name that led to the key event. The DV360 ad exchange involved in the ad click. To learn more, see managing exchanges. |
dv360InsertionOrderId | The DV360 Insertion Order ID that led to the key event. Identifies the DV360 insertion order. |
dv360InsertionOrderName | The DV360 Insertion Order Name that led to the key event. A DV360 insertion order contains a set of line items that are related to the same advertising campaign. |
dv360LineItemId | The DV360 Line Item ID that led to the key event. Identifies the DV360 line item. |
dv360LineItemName | The DV360 Line Item Name that led to the key event. A DV360 line item bids on impressions and serves creatives to inventory sources. |
dv360Medium | The DV360 Medium that led to the key event. The billable outcome of the insertion order. For example, |
dv360PartnerId | The DV360 Partner ID that led to the key event. Identifies the DV360 partner. |
dv360PartnerName | The DV360 Partner Name that led to the key event. DV360 partners represent agencies, trading desks, or large individual advertisers. |
dv360Source | The DV360 Source that led to the key event. The DV360 site name where your ad was displayed. |
dv360SourceMedium | The DV360 Source Medium that led to the key event. A combination of the source and medium. |
eventName | The name of the event. |
| File extension |
| File name |
| First session date |
| First user campaign ID |
| First user campaign |
firstUserCm360AccountId | The CM360 Account ID that originally acquired the user. Identifies the CM360 account. |
firstUserCm360AccountName | The CM360 Account Name that originally acquired the user. A CM360 account consists of advertisers, sites, campaigns, and user profiles. |
firstUserCm360AdvertiserId | The CM360 Advertiser ID that originally acquired the user. Identifies the CM360 advertiser. |
firstUserCm360AdvertiserName | The CM360 Advertiser Name that originally acquired the user. A CM360 Advertiser contains a group of campaigns, creative assets, and other settings. |
firstUserCm360CampaignId | The CM360 Campaign ID that originally acquired the user. Identifies the CM360 campaign. |
firstUserCm360CampaignName | The CM360 Campaign Name that originally acquired the user. A CM360 campaign can be configured to specify when your ads run, what landing pages are used, and other properties. |
firstUserCm360CreativeFormat | The CM360 Creative Format that originally acquired the user. CM360 creative formats are also referred to as creative types. |
firstUserCm360CreativeId | The CM360 Creative ID that originally acquired the user. Identifies a CM360 creative. |
firstUserCm360CreativeName | The CM360 Creative Name that originally acquired the user. The name given to a CM360 creative. |
firstUserCm360CreativeType | The CM360 Creative Type that originally acquired the user. A category of CM360 creatives like 'Display' or 'Tracking'. To learn more, see manage creatives |
firstUserCm360CreativeTypeId | The CM360 Creative Type ID that originally acquired the user. Identifies a CM360 creative type. |
firstUserCm360CreativeVersion | The CM360 Creative Version that originally acquired the user. The version number helps you keep track of multiple versions of your creative in your reports. If you upload a new asset to an existing creative, the version number is increased by one. |
firstUserCm360Medium | The CM360 Medium that originally acquired the user. The CM360 medium is also referred to as the placement cost structure. |
firstUserCm360PlacementCostStructure | The CM360 Placement Cost Structure that originally acquired the user. Placement cost structures regulate how media cost will be calculated. For example 'CPM'. |
firstUserCm360PlacementId | The CM360 Placement ID that originally acquired the user. Identifies a CM360 placement. A placement is the part of a website where your ad appears. |
firstUserCm360PlacementName | The CM360 Placement Name that originally acquired the user. The given name for a CM360 placement. A placement is the part of a website where your ad appears. |
firstUserCm360RenderingId | The CM360 Rendering ID that originally acquired the user. Identifies a CM360 creative. |
firstUserCm360SiteId | The CM360 Site ID that originally acquired the user. Identifies a CM360 site. |
firstUserCm360SiteName | The CM360 Site Name that originally acquired the user. The CM360 Site name from which the ad space was purchased. |
firstUserCm360Source | The CM360 Source that originally acquired the user. The CM360 source is also referred to as the site name. |
firstUserCm360SourceMedium | The CM360 Source Medium that originally acquired the user. A combination of the source and medium. |
| First user default channel group |
firstUserDv360AdvertiserId | The DV360 Advertiser ID that originally acquired the user. Identifies the DV360 advertiser. |
firstUserDv360AdvertiserName | The DV360 Advertiser Name that originally acquired the user. DV360 advertisers represent real-life businesses that run advertising campaigns. |
firstUserDv360CampaignId | The DV360 Campaign ID that originally acquired the user. Identifies the DV360 campaign. |
firstUserDv360CampaignName | The DV360 Campaign Name that originally acquired the user. DV360 campaigns group together related insertion orders with a common business goal. |
firstUserDv360CreativeFormat | The DV360 Creative Format that originally acquired the user. Also referred to as the creative type. For example, expandable, video, or native. |
firstUserDv360CreativeId | The DV360 Creative ID that originally acquired the user. Identifies the DV360 creative. |
firstUserDv360CreativeName | The DV360 Creative Name that originally acquired the user. The name given to a DV360 creative. |
firstUserDv360ExchangeId | The DV360 Exchange ID that originally acquired the user. Identifies the DV360 exchange. |
firstUserDv360ExchangeName | The DV360 Exchange Name that originally acquired the user. The DV360 ad exchange involved in the ad click. To learn more, see managing exchanges. |
firstUserDv360InsertionOrderId | The DV360 Insertion Order ID that originally acquired the user. Identifies the DV360 insertion order. |
firstUserDv360InsertionOrderName | The DV360 Insertion Order Name that originally acquired the user. A DV360 insertion order contains a set of line items that are related to the same advertising campaign. |
firstUserDv360LineItemId | The DV360 Line Item ID that originally acquired the user. Identifies the DV360 line item. |
firstUserDv360LineItemName | The DV360 Line Item Name that originally acquired the user. A DV360 line item bids on impressions and serves creatives to inventory sources. |
firstUserDv360Medium | The DV360 Medium that originally acquired the user. The billable outcome of the insertion order. For example, |
firstUserDv360PartnerId | The DV360 Partner ID that originally acquired the user. Identifies the DV360 partner. |
firstUserDv360PartnerName | The DV360 Partner Name that originally acquired the user. DV360 partners represent agencies, trading desks, or large individual advertisers. |
firstUserDv360Source | The DV360 Source that originally acquired the user. The DV360 site name where your ad was displayed. |
firstUserDv360SourceMedium | The DV360 Source Medium that originally acquired the user. A combination of the source and medium. |
| First user Google Ads account name |
| First user Google Ads ad group ID |
| First user Google Ads ad group name |
| First user Google Ads ad network type |
| First user Google Ads campaign ID |
| First user Google Ads campaign |
| First user Google Ads campaign type |
| First user Google Ads creative ID |
| First user Google Ads customer ID |
| First user Google Ads keyword text |
| First user Google Ads query |
| First user manual ad content |
firstUserManualCampaignId | The manual Campaign ID that originally acquired the user. Identifies the manual campaign. Populated by |
firstUserManualCampaignName | The manual Campaign Name that originally acquired the user. The name of the manual campaign. Populated by |
firstUserManualCreativeFormat | The manual Creative Format that originally acquired the user. Identifies the creative format used in the ad. Populated by |
firstUserManualMarketingTactic | The manual Marketing Tactic that originally acquired the user. The targeting criteria applied to a campaign. For example, remarketing or prospecting. Populated by |
firstUserManualMedium | The manual Medium that originally acquired the user. The marketing medium used in the referral. For example, |
firstUserManualSource | The manual Source that originally acquired the user. The referrer. Populated by |
firstUserManualSourceMedium | The manual Source Medium that originally acquired the user. A combination of the source and medium. |
firstUserManualSourcePlatform | The manual Source Platform that originally acquired the user. The platform responsible for directing traffic to a given Analytics property. Populated by |
| First user manual term |
| First user medium |
firstUserPrimaryChannelGroup | The primary channel group that originally acquired a user. Primary channel groups are the channel groups used in standard reports in Google Analytics and serve as an active record of your property's data in alignment with channel grouping over time. To learn more, see Custom channel groups. |
firstUserSa360AdGroupId | The SA360 Ad Group ID that originally acquired the user. Identifies the SA360 ad group. |
firstUserSa360AdGroupName | The SA360 Ad Group Name that originally acquired the user. SA360 Ad groups contain ads and keywords that relate to each other. |
firstUserSa360CampaignId | The SA360 Campaign ID that originally acquired the user. Identifies the SA360 campaign. |
firstUserSa360CampaignName | The SA360 Campaign Name that originally acquired the user. A SA360 campaign lets you organize your ads and define a goal for your advertising. |
firstUserSa360CreativeFormat | The SA360 Creative Format that originally acquired the user. The creative format is the specific layout or design of the advertisement used in a campaign. |
firstUserSa360EngineAccountId | The SA360 Engine Account ID that originally acquired the user. Identifies the SA360 engine account. |
firstUserSa360EngineAccountName | The SA360 Engine Account Name that originally acquired the user. A SA360 engine account contains campaigns, ad groups, and other items from an advertising account. To learn more, see SA360 engine account. |
firstUserSa360EngineAccountType | The SA360 Engine Account Type that originally acquired the user. The type of engine used by the search engine account. |
firstUserSa360KeywordText | The SA360 Keyword Text that originally acquired the user. The keywords that matched the search query. |
firstUserSa360ManagerAccountId | The SA360 Manager Account ID that originally acquired the user. Identifies the SA360 manager account. |
firstUserSa360ManagerAccountName | The SA360 Manager Account Name that originally acquired the user. The top level of the Search Ads 360 account hierarchy and is used for administration and reporting across the lower-level sub-manager and client accounts. |
firstUserSa360Medium | The SA360 Medium that originally acquired the user. The payment mode used in ad buying. For example, |
firstUserSa360Query | The SA360 Query that originally acquired the user. The search query typed by the user. |
firstUserSa360Source | The SA360 Source that originally acquired the user. The search query happened on this site. |
firstUserSa360SourceMedium | The SA360 Source Medium that originally acquired the user. A combination of the source and medium. |
| First user source |
| First user source / medium |
| First user source platform |
| Full page URL |
| Google Ads account name |
| Google Ads ad group ID |
| Google Ads ad group name |
| Google Ads ad network type |
| Google Ads campaign ID |
| Google Ads campaign |
| Google Ads campaign type |
| Google Ads creative ID |
| Google Ads customer ID |
| Google Ads keyword text |
| Google Ads query |
| Group ID |
| Hostname |
| Hour |
| The string |
| ISO week of the year |
| ISO year |
| ISO week of ISO year |
| Item affiliation |
| Item brand |
| Item category |
| Item category 2 |
| Item category 3 |
| Item category 4 |
| Item category 5 |
| Item ID |
| Item list ID |
| Item list name |
| Item list position |
| Item location ID |
| Item name |
| Item promotion creative name |
| Item promotion creative slot |
| Item promotion ID |
| Item promotion name |
| Item variant |
| Landing page + query string |
| Language |
| Language code |
| Level |
| Link classes |
| Link domain |
| Link ID |
| Link text |
| Link URL |
| Manual ad content |
manualCampaignId | The manual Campaign ID that led to the key event. Identifies the manual campaign. Populated by |
manualCampaignName | The manual Campaign Name that led to the key event. The name of the manual campaign. Populated by |
manualCreativeFormat | The manual Creative Format that led to the key event. Identifies the creative format used in the ad. Populated by |
manualMarketingTactic | The manual Marketing Tactic that led to the key event. The targeting criteria applied to a campaign. For example, remarketing or prospecting. Populated by |
manualMedium | The manual Medium that led to the key event. The marketing medium used in the referral. For example, |
manualSource | The manual Source that led to the key event. The referrer. Populated by |
manualSourceMedium | The manual Source Medium that led to the key event. A combination of the source and medium. |
manualSourcePlatform | The manual Source Platform that led to the key event. The platform responsible for directing traffic to a given Analytics property. Populated by |
| Manual term |
| Medium |
| Method |
| Minute |
| Device brand |
| Device |
| Mobile model |
| Month |
| New / returning |
| Nth day |
| Nth hour |
| Nth minute |
| Nth month |
| Nth week |
| Nth year |
| Operating system |
| OS version |
| Operating system with version |
| Order coupon |
| Outbound |
| Page location |
| Page path |
| Page path + query string |
| Page referrer |
| Page title |
| Percent scrolled |
| Platform |
| Platform / device category |
primaryChannelGroup | The primary channel group attributed to the key event. Primary channel groups are the channel groups used in standard reports in Google Analytics and serve as an active record of your property's data in alignment with channel grouping over time. To learn more, see Custom channel groups. |
| Region |
sa360AdGroupId | The SA360 Ad Group ID that led to the key event. Identifies the SA360 ad group. |
sa360AdGroupName | The SA360 Ad Group Name that led to the key event. SA360 Ad groups contain ads and keywords that relate to each other. |
sa360CampaignId | The SA360 Campaign ID that led to the key event. Identifies the SA360 campaign. |
sa360CampaignName | The SA360 Campaign Name that led to the key event. A SA360 campaign lets you organize your ads and define a goal for your advertising. |
sa360CreativeFormat | The SA360 Creative Format that led to the key event. The creative format is the specific layout or design of the advertisement used in a campaign. |
sa360EngineAccountId | The SA360 Engine Account ID that led to the key event. Identifies the SA360 engine account. |
sa360EngineAccountName | The SA360 Engine Account Name that led to the key event. A SA360 engine account contains campaigns, ad groups, and other items from an advertising account. To learn more, see SA360 engine account. |
sa360EngineAccountType | The SA360 Engine Account Type that led to the key event. The type of engine used by the search engine account. |
sa360KeywordText | The SA360 Keyword Text that led to the key event. The keywords that matched the search query. |
sa360ManagerAccountId | The SA360 Manager Account ID that led to the key event. Identifies the SA360 manager account. |
sa360ManagerAccountName | The SA360 Manager Account Name that led to the key event. The top level of the Search Ads 360 account hierarchy and is used for administration and reporting across the lower-level sub-manager and client accounts. |
sa360Medium | The SA360 Medium that led to the key event. The payment mode used in ad buying. For example, |
sa360Query | The SA360 Query that led to the key event. The search query typed by the user. |
sa360Source | The SA360 Source that led to the key event. The search query happened on this site. |
sa360SourceMedium | The SA360 Source Medium that led to the key event. A combination of the source and medium. |
| Screen resolution |
| Search term |
| Session campaign ID |
| Session campaign |
sessionCm360AccountId | The CM360 Account ID that led to the session. Identifies the CM360 account. |
sessionCm360AccountName | The CM360 Account Name that led to the session. A CM360 account consists of advertisers, sites, campaigns, and user profiles. |
sessionCm360AdvertiserId | The CM360 Advertiser ID that led to the session. Identifies the CM360 advertiser. |
sessionCm360AdvertiserName | The CM360 Advertiser Name that led to the session. A CM360 Advertiser contains a group of campaigns, creative assets, and other settings. |
sessionCm360CampaignId | The CM360 Campaign ID that led to the session. Identifies the CM360 campaign. |
sessionCm360CampaignName | The CM360 Campaign Name that led to the session. A CM360 campaign can be configured to specify when your ads run, what landing pages are used, and other properties. |
sessionCm360CreativeFormat | The CM360 Creative Format that led to the session. CM360 creative formats are also referred to as creative types. |
sessionCm360CreativeId | The CM360 Creative ID that led to the session. Identifies a CM360 creative. |
sessionCm360CreativeName | The CM360 Creative Name that led to the session. The name given to a CM360 creative. |
sessionCm360CreativeType | The CM360 Creative Type that led to the session. A category of CM360 creatives like 'Display' or 'Tracking'. To learn more, see manage creatives |
sessionCm360CreativeTypeId | The CM360 Creative Type ID that led to the session. Identifies a CM360 creative type. |
sessionCm360CreativeVersion | The CM360 Creative Version that led to the session. The version number helps you keep track of multiple versions of your creative in your reports. If you upload a new asset to an existing creative, the version number is increased by one. |
sessionCm360Medium | The CM360 Medium that led to the session. The CM360 medium is also referred to as the placement cost structure. |
sessionCm360PlacementCostStructure | The CM360 Placement Cost Structure that led to the session. Placement cost structures regulate how media cost will be calculated. For example 'CPM'. |
sessionCm360PlacementId | The CM360 Placement ID that led to the session. Identifies a CM360 placement. A placement is the part of a website where your ad appears. |
sessionCm360PlacementName | The CM360 Placement Name that led to the session. The given name for a CM360 placement. A placement is the part of a website where your ad appears. |
sessionCm360RenderingId | The CM360 Rendering ID that led to the session. Identifies a CM360 creative. |
sessionCm360SiteId | The CM360 Site ID that led to the session. Identifies a CM360 site. |
sessionCm360SiteName | The CM360 Site Name that led to the session. The CM360 Site name from which the ad space was purchased. |
sessionCm360Source | The CM360 Source that led to the session. The CM360 source is also referred to as the site name. |
sessionCm360SourceMedium | The CM360 Source Medium that led to the session. A combination of the source and medium. |
| Session default channel group |
sessionDv360AdvertiserId | The DV360 Advertiser ID that led to the session. Identifies the DV360 advertiser. |
sessionDv360AdvertiserName | The DV360 Advertiser Name that led to the session. DV360 advertisers represent real-life businesses that run advertising campaigns. |
sessionDv360CampaignId | The DV360 Campaign ID that led to the session. Identifies the DV360 campaign. |
sessionDv360CampaignName | The DV360 Campaign Name that led to the session. DV360 campaigns group together related insertion orders with a common business goal. |
sessionDv360CreativeFormat | The DV360 Creative Format that led to the session. Also referred to as the creative type. For example, expandable, video, or native. |
sessionDv360CreativeId | The DV360 Creative ID that led to the session. Identifies the DV360 creative. |
sessionDv360CreativeName | The DV360 Creative Name that led to the session. The name given to a DV360 creative. |
sessionDv360ExchangeId | The DV360 Exchange ID that led to the session. Identifies the DV360 exchange. |
sessionDv360ExchangeName | The DV360 Exchange Name that led to the session. The DV360 ad exchange involved in the ad click. To learn more, see managing exchanges. |
sessionDv360InsertionOrderId | The DV360 Insertion Order ID that led to the session. Identifies the DV360 insertion order. |
sessionDv360InsertionOrderName | The DV360 Insertion Order Name that led to the session. A DV360 insertion order contains a set of line items that are related to the same advertising campaign. |
sessionDv360LineItemId | The DV360 Line Item ID that led to the session. Identifies the DV360 line item. |
sessionDv360LineItemName | The DV360 Line Item Name that led to the session. A DV360 line item bids on impressions and serves creatives to inventory sources. |
sessionDv360Medium | The DV360 Medium that led to the session. The billable outcome of the insertion order. For example, |
sessionDv360PartnerId | The DV360 Partner ID that led to the session. Identifies the DV360 partner. |
sessionDv360PartnerName | The DV360 Partner Name that led to the session. DV360 partners represent agencies, trading desks, or large individual advertisers. |
sessionDv360Source | The DV360 Source that led to the session. The DV360 site name where your ad was displayed. |
sessionDv360SourceMedium | The DV360 Source Medium that led to the session. A combination of the source and medium. |
| Session Google Ads account name |
| Session Google Ads ad group ID |
| Session Google Ads ad group name |
| Session Google Ads ad network type |
| Session Google Ads campaign ID |
| Session Google Ads campaign |
| Session Google Ads campaign type |
| Session Google Ads creative ID |
| Session Google Ads customer ID |
| Session Google Ads keyword text |
| Session Google Ads query |
| Session manual ad content |
sessionManualCampaignId | The manual Campaign ID that led to the session. Identifies the manual campaign. Populated by |
sessionManualCampaignName | The manual Campaign Name that led to the session. The name of the manual campaign. Populated by |
sessionManualCreativeFormat | The manual Creative Format that led to the session. Identifies the creative format used in the ad. Populated by |
sessionManualMarketingTactic | The manual Marketing Tactic that led to the session. The targeting criteria applied to a campaign. For example, remarketing or prospecting. Populated by |
sessionManualMedium | The manual Medium that led to the session. The marketing medium used in the referral. For example, |
sessionManualSource | The manual Source that led to the session. The referrer. Populated by |
sessionManualSourceMedium | The manual Source Medium that led to the session. A combination of the source and medium. |
sessionManualSourcePlatform | The manual Source Platform that led to the session. The platform responsible for directing traffic to a given Analytics property. Populated by |
| Session manual term |
| Session medium |
sessionPrimaryChannelGroup | The primary channel group that led to the session. Primary channel groups are the channel groups used in standard reports in Google Analytics and serve as an active record of your property's data in alignment with channel grouping over time. To learn more, see Custom channel groups. |
sessionSa360AdGroupId | The SA360 Ad Group ID that led to the session. Identifies the SA360 ad group. |
| Session SA360 ad group name |
| Session SA360 campaign ID |
| Session SA360 campaign |
| Session SA360 creative format |
| Session SA360 engine account ID |
| Session SA360 engine account name |
| Session SA360 engine account type |
| Session SA360 keyword text |
| Session SA360 medium |
| Session SA360 query |
| Session SA360 source |
| Session source |
| Session source / medium |
| Session source platform |
| Shipping tier |
| Signed in with user ID |
| Source |
| Source / medium |
| Source platform |
| Stream ID |
| Stream name |
| Test data filter ID |
| Test data filter name |
| Transaction ID |
| Page path and screen class |
| Page path + query string and screen class |
| Page title and screen class |
| Page title and screen name |
| Age |
| Gender |
| Video provider |
| Video title |
| Video URL |
| Virtual currency name |
| Visible |
| Week |
| Year |
| Year month |
| Year week |
customEvent:element_id | An event scoped custom dimension for your Analytics property. |
customEvent:element_type | An event scoped custom dimension for your Analytics property. |
Available Metrics
API Name | UI Name |
---|---|
| 1-day active users |
| 28-day active users |
| 7-day active users |
| Active users |
| Add to carts |
| Ad unit exposure |
| Ads clicks |
| Ads cost |
| Ads cost per click |
| Cost per conversion |
| Ads impressions |
| Average purchase revenue |
| ARPPU |
| Average purchase revenue per user |
| ARPU |
| Average session duration |
| Bounce rate |
| Cart-to-view rate |
| Checkouts |
| Cohort active users |
| Cohort total users |
| Crash-affected users |
| Crash-free users rate |
| DAU / MAU |
| DAU / WAU |
| Ecommerce purchases |
| Engaged sessions |
| Engagement rate |
| Event count |
| Event count per user |
| Events per session |
| Event value |
| First-time purchaser conversion |
| First time purchasers |
| First-time purchasers per new user |
grossItemRevenue | The total revenue from items only. Gross item revenue is the product of its price and quantity. Item revenue excludes tax and shipping values; tax & shipping values are specified at the event and not item level. Gross item revenue does not include refunds. |
grossPurchaseRevenue | The sum of revenue from purchases made in your app or site. Gross purchase revenue sums the revenue for these events: |
itemDiscountAmount | The monetary value of item discounts in eCommerce events. This metric is populated in tagging by the |
| Item-list click events |
| Item list click through rate |
| Item-list view events |
| Item view events |
| Item promotion click through rate |
itemRefundAmount | Item refund amount is the total refunded transaction revenue from items only. Item refund amount is the product of price and quantity for the |
| Item revenue |
itemsAddedToCart | The number of units added to cart for a single item. This metric counts the quantity of items in |
| Items checked out |
| Items clicked in list |
| Items clicked in promotion |
| Items purchased |
| Items viewed |
| Items viewed in list |
| Items viewed in promotion |
itemViewEvents | The number of times the item details were viewed. The metric counts the occurrence of the |
keyEvents | The count of key events. Marking an event as a key event affects reports from time of creation. It doesn't change historic data. You can mark any event as key in Google Analytics, and some events (such as |
| New users |
| Organic google search average position |
| Organic google search clicks |
| Organic google search click through rate |
| Organic google search impressions |
| Promotion clicks |
| Promotion views |
| Publisher ad clicks |
| Publisher ad impressions |
| The sum of revenue from purchases minus refunded transaction revenue made in your app or site. Purchase revenue sums the revenue for these events: |
purchaserRate | The percentage of active users who made 1 or more purchase transactions. This metric is returned as a fraction; for example, 0.412 means 41.2% of users were purchasers. |
| Purchase-to-view rate |
refundAmount | The total refunded transaction revenues. Refund amount sums refunded revenue for the |
| Return on ad spend |
| Views |
| The number of app screens or web pages your users viewed per session. Repeated views of a single page or screen are counted. (screen_view + page_view events) / sessions. |
| Views per user |
| Scrolled users |
| The percentage of sessions in which any key event was triggered. |
| Sessions |
| Sessions per user |
| Shipping amount |
| Tax amount |
| Total ad revenue |
| Total purchasers |
| Total revenue |
| Total users |
| Transactions |
| Transactions per purchaser |
| User engagement |
userKeyEventRate | The percentage of users who triggered any key event. |
| WAU / MAU |
keyEvents:cta_click | The count of a specific key event. |
keyEvents:generate_lead | The count of a specific key event. |
keyEvents:purchase | The count of a specific key event. |
sessionKeyEventRate:cta_click | The percentage of sessions in which a specific key event was triggered. |
sessionKeyEventRate:generate_lead | The percentage of sessions in which a specific key event was triggered. |
sessionKeyEventRate:purchase | The percentage of sessions in which a specific key event was triggered. |
userKeyEventRate:cta_click | The percentage of users who triggered a specific key event. |
userKeyEventRate:generate_lead | The percentage of users who triggered a specific key event. |
userKeyEventRate:purchase | The percentage of users who triggered a specific key event. |
Examples
1. Creating an ActiveUsersInCountry
procedure that returns a dataset with three fields: country, userGender, activeUsers
:
CALL analytics_data_ds.CreateProcedure_ReplicateData( dimensions => 'country,userGender', metrics => 'activeUsers', procName => 'ActiveUsersInCountry');;
The procedure makes use of the following parameters:
dimensions
: comma-separated list of dimensionsmetrics
: comma-separated list of metricsprocName
: name of the procedure to be created
2. Calling the ActiveUsersInCountry
procedure to get data:
CALL analytics_data_ds.ActiveUsersInCountry( propertyId => <propertyId>, startDate => '2023-06-01', endDate => '2023-06-21', preview => true);;
For instructions on how to get the property identifier, please refer to the Google Analytics Data API documentation.
A useful tool is Google Query Explorer. You can construct a query there and see if it will return any data or if the result should be empty for the given combination of dimensions/metrics.