Skip to main content
Skip table of contents

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:

SQL
SELECT "deployed" FROM "SYSADMIN.ModularConnectors" WHERE "name" = 'google-analytics-data';;
  1. Deploy the connector using the SYSADMIN.deployModularConnector procedure:

SQL
CALL "SYSADMIN.deployModularConnector"(
    "name" => 'google-analytics-data',
    "deploy" => true
);;
  1. Configure the connection using the SYSADMIN.createConnection() procedure.

The connection can be created in several ways:

  • via client email and private key:

SQL
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:

SQL
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 and redirectUri:

SQL
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:

CODE
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

achievementId

Achievement ID

adFormat 

Ad format

adSourceName 

Ad source

adUnitName 

Ad unit

appVersion 

App version

audienceId 

Audience ID

audienceName 

Audience name

brandingInterest 

Interests

browser 

Browser

campaignId 

Campaign ID

campaignName 

Campaign

"character"

Character

city 

City

cityId 

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.

cohort 

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.

cohortNthDay 

Daily cohort

cohortNthMonth 

Monthly cohort

cohortNthWeek 

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.

contentGroup 

Content group

contentId 

Content ID

contentType 

Content type

continent 

Continent

continentId 

Continent ID

country 

Country

countryId 

Country ID

currencyCode

The local currency code (based on ISO 4217 standard) of the eCommerce event. For example, USD or GBP. Currency is specified in tagging by the currency parameter. Businesses that transact in more than one currency can specify a local currency code when sending eCommerce events to Analytics, and this dimension shows those currencies. To Learn more, See Currency reference.

"date"

Date

dateHour 

Date + hour (YYYYMMDDHH)

dateHourMinute 

Date hour and minute

"day"

Day

"dayOfWeek"

Day of week

dayOfWeekName 

Day of week name

defaultChannelGroup 

Default channel group

deviceCategory 

Device category

deviceModel 

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, cpm.

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.

fileExtension 

File extension

fileName 

File name

firstSessionDate 

First session date

firstUserCampaignId 

First user campaign ID

firstUserCampaignName 

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.

firstUserDefaultChannelGroup 

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, cpm.

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.

firstUserGoogleAdsAccountName 

First user Google Ads account name

firstUserGoogleAdsAdGroupId 

First user Google Ads ad group ID

firstUserGoogleAdsAdGroupName 

First user Google Ads ad group name

firstUserGoogleAdsAdNetworkType 

First user Google Ads ad network type

firstUserGoogleAdsCampaignId 

First user Google Ads campaign ID

firstUserGoogleAdsCampaignName 

First user Google Ads campaign

firstUserGoogleAdsCampaignType 

First user Google Ads campaign type

firstUserGoogleAdsCreativeId 

First user Google Ads creative ID

firstUserGoogleAdsCustomerId 

First user Google Ads customer ID

firstUserGoogleAdsKeyword 

First user Google Ads keyword text

firstUserGoogleAdsQuery 

First user Google Ads query

firstUserManualAdContent 

First user manual ad content

firstUserManualCampaignId

The manual Campaign ID that originally acquired the user. Identifies the manual campaign. Populated by utm_id URL parameter.

firstUserManualCampaignName

The manual Campaign Name that originally acquired the user. The name of the manual campaign. Populated by utm_campaign URL parameter. To learn more, see Collect campaign data with custom URLs.

firstUserManualCreativeFormat

The manual Creative Format that originally acquired the user. Identifies the creative format used in the ad. Populated by utm_creative_format URL parameter.

firstUserManualMarketingTactic

The manual Marketing Tactic that originally acquired the user. The targeting criteria applied to a campaign. For example, remarketing or prospecting. Populated by utm_marketing_tactic URL parameter.

firstUserManualMedium

The manual Medium that originally acquired the user. The marketing medium used in the referral. For example, cpc. Populated by utm_medium URL parameter.

firstUserManualSource

The manual Source that originally acquired the user. The referrer. Populated by utm_source URL parameter.

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 utm_source_platform URL parameter.

firstUserManualTerm 

First user manual term

firstUserMedium 

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, cpc.

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.

firstUserSource 

First user source

firstUserSourceMedium 

First user source / medium

firstUserSourcePlatform 

First user source platform

fullPageUrl 

Full page URL

googleAdsAccountName 

Google Ads account name

googleAdsAdGroupId 

Google Ads ad group ID

googleAdsAdGroupName 

Google Ads ad group name

googleAdsAdNetworkType 

Google Ads ad network type

googleAdsCampaignId 

Google Ads campaign ID

googleAdsCampaignName 

Google Ads campaign

googleAdsCampaignType 

Google Ads campaign type

googleAdsCreativeId 

Google Ads creative ID

googleAdsCustomerId 

Google Ads customer ID

googleAdsKeyword 

Google Ads keyword text

googleAdsQuery 

Google Ads query

groupId 

Group ID

hostName 

Hostname

"hour"

Hour

isKeyEvent

The string true if the event is a key event. 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 first_open or purchase) are marked as key events by default.

isoWeek 

ISO week of the year

isoYear 

ISO year

isoYearIsoWeek 

ISO week of ISO year

itemAffiliation 

Item affiliation

itemBrand 

Item brand

itemCategory 

Item category

itemCategory2

Item category 2

itemCategory3 

Item category 3

itemCategory4 

Item category 4

itemCategory5 

Item category 5

itemId 

Item ID

itemListId 

Item list ID

itemListName 

Item list name

itemListPosition 

Item list position

itemLocationID 

Item location ID

itemName 

Item name

itemPromotionCreativeName 

Item promotion creative name

itemPromotionCreativeSlot 

Item promotion creative slot

itemPromotionId 

Item promotion ID

itemPromotionName 

Item promotion name

itemVariant 

Item variant

landingPagePlusQueryString 

Landing page + query string

"language"

Language

languageCode 

Language code

level 

Level

linkClasses 

Link classes

linkDomain 

Link domain

linkId 

Link ID

linkText 

Link text

linkUrl 

Link URL

manualAdContent 

Manual ad content

manualCampaignId

The manual Campaign ID that led to the key event. Identifies the manual campaign. Populated by utm_id URL parameter.

manualCampaignName

The manual Campaign Name that led to the key event. The name of the manual campaign. Populated by utm_campaign URL parameter. To learn more, see Collect campaign data with custom URLs.

manualCreativeFormat

The manual Creative Format that led to the key event. Identifies the creative format used in the ad. Populated by utm_creative_format URL parameter.

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 utm_marketing_tactic URL parameter.

manualMedium

The manual Medium that led to the key event. The marketing medium used in the referral. For example, cpc. Populated by utm_medium URL parameter.

manualSource

The manual Source that led to the key event. The referrer. Populated by utm_source URL parameter.

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 utm_source_platform URL parameter.

manualTerm 

Manual term

medium 

Medium

"method"

Method

"minute" 

Minute

mobileDeviceBranding 

Device brand

mobileDeviceMarketingName 

Device

mobileDeviceModel 

Mobile model

"month"

Month

newVsReturning 

New / returning

nthDay 

Nth day

nthHour 

Nth hour

nthMinute 

Nth minute

nthMonth 

Nth month

nthWeek 

Nth week

nthYear 

Nth year

operatingSystem 

Operating system

operatingSystemVersion 

OS version

operatingSystemWithVersion 

Operating system with version

orderCoupon 

Order coupon

outbound 

Outbound

pageLocation 

Page location

pagePath 

Page path

pagePathPlusQueryString 

Page path + query string

pageReferrer 

Page referrer

pageTitle 

Page title

percentScrolled 

Percent scrolled

platform 

Platform

platformDeviceCategory 

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 

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, cpc.

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.

screenResolution 

Screen resolution

searchTerm 

Search term

sessionCampaignId 

Session campaign ID

sessionCampaignName 

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.

sessionDefaultChannelGroup 

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, cpm.

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.

sessionGoogleAdsAccountName 

Session Google Ads account name

sessionGoogleAdsAdGroupId 

Session Google Ads ad group ID

sessionGoogleAdsAdGroupName 

Session Google Ads ad group name

sessionGoogleAdsAdNetworkType 

Session Google Ads ad network type

sessionGoogleAdsCampaignId 

Session Google Ads campaign ID

sessionGoogleAdsCampaignName 

Session Google Ads campaign

sessionGoogleAdsCampaignType 

Session Google Ads campaign type

sessionGoogleAdsCreativeId 

Session Google Ads creative ID

sessionGoogleAdsCustomerId 

Session Google Ads customer ID

sessionGoogleAdsKeyword 

Session Google Ads keyword text

sessionGoogleAdsQuery 

Session Google Ads query

sessionManualAdContent 

Session manual ad content

sessionManualCampaignId

The manual Campaign ID that led to the session. Identifies the manual campaign. Populated by utm_id URL parameter.

sessionManualCampaignName

The manual Campaign Name that led to the session. The name of the manual campaign. Populated by utm_campaign URL parameter. To learn more, see Collect campaign data with custom URLs.

sessionManualCreativeFormat

The manual Creative Format that led to the session. Identifies the creative format used in the ad. Populated by utm_creative_format URL parameter.

sessionManualMarketingTactic

The manual Marketing Tactic that led to the session. The targeting criteria applied to a campaign. For example, remarketing or prospecting. Populated by utm_marketing_tactic URL parameter.

sessionManualMedium

The manual Medium that led to the session. The marketing medium used in the referral. For example, cpc. Populated by utm_medium URL parameter.

sessionManualSource

The manual Source that led to the session. The referrer. Populated by utm_source URL parameter.

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 utm_source_platform URL parameter.

sessionManualTerm 

Session manual term

sessionMedium 

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.

sessionSa360AdGroupName 

Session SA360 ad group name

sessionSa360CampaignId 

Session SA360 campaign ID

sessionSa360CampaignName 

Session SA360 campaign

sessionSa360CreativeFormat 

Session SA360 creative format

sessionSa360EngineAccountId 

Session SA360 engine account ID

sessionSa360EngineAccountName 

Session SA360 engine account name

sessionSa360EngineAccountType 

Session SA360 engine account type

sessionSa360Keyword 

Session SA360 keyword text

sessionSa360Medium 

Session SA360 medium

sessionSa360Query 

Session SA360 query

sessionSa360Source 

Session SA360 source

sessionSource 

Session source

sessionSourceMedium 

Session source / medium

sessionSourcePlatform 

Session source platform

shippingTier 

Shipping tier

signedInWithUserId 

Signed in with user ID

source 

Source

sourceMedium 

Source / medium

sourcePlatform 

Source platform

streamId 

Stream ID

streamName 

Stream name

testDataFilterId 

Test data filter ID

testDataFilterName 

Test data filter name

transactionId 

Transaction ID

unifiedPagePathScreen 

Page path and screen class

unifiedPageScreen 

Page path + query string and screen class

unifiedScreenClass 

Page title and screen class

unifiedScreenName 

Page title and screen name

userAgeBracket 

Age

userGender 

Gender

videoProvider 

Video provider

videoTitle 

Video title

videoUrl 

Video URL

virtualCurrencyName 

Virtual currency name

visible 

Visible

"week" 

Week

"year"

Year

yearMonth 

Year month

yearWeek 

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

active1DayUsers

1-day active users

active28DayUsers

28-day active users

active7DayUsers

7-day active users

activeUsers

Active users

addToCarts

Add to carts

adUnitExposure

Ad unit exposure

advertiserAdClicks

Ads clicks

advertiserAdCost

Ads cost

advertiserAdCostPerClick

Ads cost per click

advertiserAdCostPerConversion

Cost per conversion

advertiserAdImpressions

Ads impressions

averagePurchaseRevenue

Average purchase revenue

averagePurchaseRevenuePerPayingUser

ARPPU

averagePurchaseRevenuePerUser

Average purchase revenue per user

averageRevenuePerUser

ARPU

averageSessionDuration

Average session duration

bounceRate

Bounce rate

cartToViewRate

Cart-to-view rate

checkouts

Checkouts

cohortActiveUsers

Cohort active users

cohortTotalUsers

Cohort total users

crashAffectedUsers

Crash-affected users

crashFreeUsersRate

Crash-free users rate

dauPerMau

DAU / MAU

dauPerWau

DAU / WAU

ecommercePurchases

Ecommerce purchases

engagedSessions

Engaged sessions

engagementRate

Engagement rate

eventCount

Event count

eventCountPerUser

Event count per user

eventsPerSession

Events per session

eventValue

Event value

firstTimePurchaserConversionRate

First-time purchaser conversion

firstTimePurchasers

First time purchasers

firstTimePurchasersPerNewUser

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: purchase, ecommerce_purchase, in_app_purchase, app_store_subscription_convert, and app_store_subscription_renew. Purchase revenue is specified by the value parameter in tagging.

itemDiscountAmount

The monetary value of item discounts in eCommerce events. This metric is populated in tagging by the discount item parameter.

itemListClickEvents

Item-list click events

itemListClickThroughRate

Item list click through rate

itemListViewEvents

Item-list view events

itemViewEvents

Item view events

itemPromotionClickThroughRate

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 refund event.

itemRevenue

Item revenue

itemsAddedToCart

The number of units added to cart for a single item. This metric counts the quantity of items in add_to_cart events.

itemsCheckedOut

Items checked out

itemsClickedInList

Items clicked in list

itemsClickedInPromotion

Items clicked in promotion

itemsPurchased

Items purchased

itemsViewed

Items viewed

itemsViewedInList

Items viewed in list

itemsViewedInPromotion

Items viewed in promotion

itemViewEvents

The number of times the item details were viewed. The metric counts the occurrence of the view_item event.

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 first_open or purchase) are marked as key events by default.

newUsers

New users

organicGoogleSearchAveragePosition

Organic google search average position

organicGoogleSearchClicks

Organic google search clicks

organicGoogleSearchClickThroughRate

Organic google search click through rate

organicGoogleSearchImpressions

Organic google search impressions

promotionClicks

Promotion clicks

promotionViews

Promotion views

publisherAdClicks

Publisher ad clicks

publisherAdImpressions

Publisher ad impressions

purchaseRevenue

The sum of revenue from purchases minus refunded transaction revenue made in your app or site. Purchase revenue sums the revenue for these events: purchase, ecommerce_purchase, in_app_purchase, app_store_subscription_convert, and app_store_subscription_renew. Purchase revenue is specified by the value parameter in tagging.

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.

purchaseToViewRate

Purchase-to-view rate

refundAmount

The total refunded transaction revenues. Refund amount sums refunded revenue for the refund and app_store_refund events.

returnOnAdSpend

Return on ad spend

screenPageViews

Views

screenPageViewsPerSession

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.

screenPageViewsPerUser

Views per user

scrolledUsers

Scrolled users

sessionKeyEventRate

The percentage of sessions in which any key event was triggered.

sessions

Sessions

sessionsPerUser

Sessions per user

shippingAmount

Shipping amount

taxAmount

Tax amount

totalAdRevenue

Total ad revenue

totalPurchasers

Total purchasers

totalRevenue

Total revenue

totalUsers

Total users

transactions

Transactions

transactionsPerPurchaser

Transactions per purchaser

userEngagementDuration

User engagement

userKeyEventRate

The percentage of users who triggered any key event.

wauPerMau

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

SQL
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 dimensions

  • metrics: comma-separated list of metrics

  • procName: name of the procedure to be created

2. Calling the ActiveUsersInCountry procedure to get data: 

CODE
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.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.