How to get a list of the dimensions and metrics in your GA4 property

Query the Google Analytics Data API using GAPandas4 and get back a full list of dimensions and metrics, including custom dimensions and metrics, stored in your GA4 property.

How to get a list of the dimensions and metrics in your GA4 property
Picture by Life Of Pix, Pexels.
47 minutes to read

Google Analytics 4 uses a completely different set of dimensions and metrics to Google Analytics 3 or Universal Analytics. In this project I’ll show you how to get back a full list of all the dimensions and metrics from your GA4 property using GAPandas4, so you can use them in your API queries.

GAPandas4, like its predecessor GAPandas, is a Python package that lets you easily query the Google Analytics API (in this case the new Google Analytics Data API for GA4) and return the results in a Pandas dataframe. It’s designed to require minimal code and be quick and easy to use.

Install and import the packages

First, you’ll need to open a Jupyter notebook or Google Colab notebook and import the GAPandas4 package from my GitHub repository. This will install GAPandas4 and its dependencies. We’ll then import it as gp, import Pandas, and use the set_option() function to increase the maximum number of rows shown and their maximum width.

!pip3 install --upgrade git+https://github.com/practical-data-science/gapandas4.git
import pandas as pd
import gapandas4 as gp
pd.set_option('max_rows', 200)
pd.set_option('max_colwidth', 1000)

Configure your settings

Next, you’ll need to configure a couple of variables - one to hold the file path to your Google Service Account client secrets JSON keyfile and the other with the property ID for the Google Analytics 4 property you want to query. Setting up a client secrets keyfile can be a bit fiddly, but you only need to do it once, and you can use the keyfile in all future projects.

service_account = 'client_secrets.json'
property_id = '308615019'

Fetch the metadata from your GA4 property

Finally, we can fetch a Pandas dataframe of the metadata from your GA4 property using the get_metadata() function. This function will return all dimensions and metrics from your account, including both the built-in ones and any custom dimensions or metrics you might have created. The custom ones are identifiable by a True boolean value in the Custom definition column. Here’s a sample of the data.

metadata = gp.get_metadata(service_account, property_id)
metadata.sample(3)
Type Data type API Name UI Name Description Custom definition
216 Metric TYPE_FLOAT sessionsPerUser Sessions per user The average number of sessions per user (Sessions divided by Active Users). False
26 Dimension STRING day Day The day of the month, a two-digit number from 01 to 31. False
70 Dimension STRING itemCategory2 Item category 2 The hierarchical category in which the item is classified. For example, in Apparel/Mens/Summer/Shirts/T-shirts, Mens is the item category 2. False

View the dimensions from your property

To view all the dimensions in your GA4 property you can simply filter the Pandas dataframe to return only those lines where the Type column contains the value Dimension. The API name values shown here can be used in any GAPandas4 queries you create.

dimensions = metadata[metadata['Type']=='Dimension']
dimensions[['API Name', 'UI Name', 'Description']]
API Name UI Name Description
0 achievementId Achievement ID The achieventment ID in a game for an event. Populated by the event parameter 'achievement_id'.
1 adFormat Ad format Describes the way ads looked and where they were located. Typical formats include 'Interstitial', 'Banner', 'Rewarded', and 'Native advanced'.
2 adSourceName Ad source The source network that served the ad. Typical sources include 'AdMob Network', 'Liftoff', 'Facebook Audience Network', and 'Mediated house ads'.
3 adUnitName Ad unit The name you chose to describe this Ad unit. Ad units are containers you place in your apps to show ads to users.
4 appVersion App version The app's versionName (Android) or short bundle version (iOS).
5 audienceId Audience ID The numeric identifier of an Audience. Users are reported in the audiences to which they belonged during the report's date range. Current user behavior does not affect historical audience membership in reports.
6 audienceName Audience name The given name of an Audience. Users are reported in the audiences to which they belonged during the report's date range. Current user behavior does not affect historical audience membership in reports.
7 brandingInterest Interests Interests demonstrated by users who are higher in the shopping funnel. Users can be counted in multiple interest categories. For example, 'Shoppers', 'Lifestyles & Hobbies/Pet Lovers', or 'Travel/Travel Buffs/Beachbound Travelers'.
8 browser Browser The browsers used to view your website.
9 campaignId Campaign ID The identifier of the marketing campaign. Present only for conversion events.
10 campaignName Campaign The name of the marketing campaign. Present only for conversion events.
11 character Character The player character in a game for an event. Populated by the event parameter 'character'.
12 city City The city from which the user activity originated.
13 cityId City ID The geographic ID of the city from which the user activity originated, derived from their IP address.
14 cohort 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: cohort_0, cohort_1, etc.
15 cohortNthDay Daily cohort Day offset relative to the firstSessionDate for the users in the cohort. For example, if a cohort is selected with the start and end date of 2020-03-01, then for the date 2020-03-02, cohortNthDay will be 0001.
16 cohortNthMonth Monthly cohort Month offset relative to the firstSessionDate for the users in the cohort. Month boundaries align with calendar month boundaries. For example, if a cohort is selected with the start and end date in March 2020, then for any date in April 2020, cohortNthMonth will be 0001.
17 cohortNthWeek Weekly cohort Week offset relative to the firstSessionDate for the users in the cohort. Weeks start on Sunday and end on Saturday. For example, if a cohort is selected with the start and end date in the range 2020-11-08 to 2020-11-14, then for the dates in the range 2020-11-15 to 2020-11-21, cohortNthWeek will be 0001.
18 contentGroup Content group A category that applies to items of published content. Populated by the event parameter 'content_group'.
19 contentId Content ID The identifier of the selected content. Populated by the event parameter 'content_id'.
20 contentType Content type The category of the selected content. Populated by the event parameter 'content_type'.
21 country Country The country from which the user activity originated.
22 countryId Country ID The geographic ID of the country from which the user activity originated, derived from their IP address. Formatted according to ISO 3166-1 alpha-2 standard.
23 date Date The date of the event, formatted as YYYYMMDD.
24 dateHour Date + hour (YYYYMMDDHH) The combined values of date and hour formatted as YYYYMMDDHH.
25 dateHourMinute Date hour and minute The combined values of date, hour, and minute formatted as YYYYMMDDHHMM.
26 day Day The day of the month, a two-digit number from 01 to 31.
27 dayOfWeek Day of week The day of the week. It returns values in the range [0,6] with Sunday as the first day of the week.
28 defaultChannelGrouping Default channel grouping The conversion's default channel grouping is based primarily on source and medium. An enumeration which includes 'Direct', 'Organic Search', 'Paid Social', 'Organic Social', 'Email', 'Affiliates', 'Referral', 'Paid Search', 'Video', and 'Display'.
29 deviceCategory Device category The type of device: Desktop, Tablet, or Mobile.
30 deviceModel Device model The mobile device model (example: iPhone 10,6).
31 eventName Event name The name of the event.
32 fileExtension File extension The extension of the downloaded file (for example, 'pdf' or 'txt'). Automatically populated if Enhanced Measurement is enabled. Populated by the event parameter 'file_extension'.
33 fileName File name The page path of the downloaded file (for example, '/menus/dinner-menu.pdf'). Automatically populated if Enhanced Measurement is enabled. Populated by the event parameter 'file_name'.
34 firstSessionDate First session date The date the user's first session occurred, formatted as YYYYMMDD.
35 firstUserCampaignId First user campaign ID Identifier of the marketing campaign that first acquired the user. Includes Google Ads Campaigns.
36 firstUserCampaignName First user campaign Name of the marketing campaign that first acquired the user. Includes Google Ads and Manual Campaigns.
37 firstUserDefaultChannelGrouping First user default channel grouping The default channel grouping that first acquired the user. Default channel grouping is based primarily on source and medium. An enumeration which includes 'Direct', 'Organic Search', 'Paid Social', 'Organic Social', 'Email', 'Affiliates', 'Referral', 'Paid Search', 'Video', and 'Display'.
38 firstUserGoogleAdsAccountName First user Google Ads account name The Account name from Google Ads that first acquired the user.
39 firstUserGoogleAdsAdGroupId First user Google Ads ad group ID The Ad Group Id in Google Ads that first acquired the user.
40 firstUserGoogleAdsAdGroupName First user Google Ads ad group name The Ad Group Name in Google Ads that first acquired the user.
41 firstUserGoogleAdsAdNetworkType First user Google Ads ad network type The advertising network that first acquired the user. An enumeration which includes 'Google search', 'Search partners', 'Google Display Network', 'Youtube Search', 'Youtube Videos', 'Cross-network', 'Social', and '(universal campaign)'.
42 firstUserGoogleAdsCampaignType First user Google Ads campaign type The campaign type of the Google Ads campaign that first acquired the user. Campaign types determine where customers see your ads and the settings and options available to you in Google Ads. Campaign type is an enumeration that includes: Search, Display, Shopping, Video, Discovery, App, Smart, Hotel, Local, and Performance Max. To learn more, see https://support.google.com/google-ads/answer/2567043.
43 firstUserGoogleAdsCreativeId First user Google Ads creative ID The ID of the Google Ads creative that first acquired the user. Creative IDs identify individual ads.
44 firstUserGoogleAdsCustomerId First user Google Ads customer ID The Customer ID from Google Ads that first acquired the user. Customer IDs in Google Ads uniquely identify Google Ads accounts.
45 firstUserGoogleAdsKeyword First user Google Ads keyword text The matched keyword that first acquired the user. Keywords are words or phrases describing your product or service that you choose to get your ad in front of the right customers. To learn more about Keywords, see <https://support.google.com/google-ads/answer/6323>.
46 firstUserGoogleAdsQuery First user Google Ads query The search query that first acquired the user.
47 firstUserManualAdContent First user manual ad content The ad content that first acquired the user. Populated by the utm_content parameter.
48 firstUserManualTerm First user manual term The term that first acquired the user. Populated by the utm_term parameter.
49 firstUserMedium First user medium The medium that first acquired the user to your website or app.
50 firstUserSource First user source The source that first acquired the user to your website or app.
51 firstUserSourceMedium First user source / medium The combined values of the dimensions 'firstUserSource' and 'firstUserMedium'.
52 firstUserSourcePlatform First user source platform The source platform that first acquired the user. Please do not depend on this field returning 'Manual' for traffic that uses UTMs; this field will update from returning 'Manual' to returning '(not set)' for an upcoming feature launch.
53 fullPageUrl Full page URL The hostname, page path, and query string for web pages visited; for example, the fullPageUrl portion of https://www.example.com/store/contact-us?query_string=true is www.example.com/store/contact-us?query_string=true.
54 googleAdsAccountName Google Ads account name The Account name from Google Ads for the campaign that led to the conversion event. Corresponds to customer.descriptive_name in the Google Ads API.
55 googleAdsAdGroupId Google Ads ad group ID The ad group id attributed to the conversion event.
56 googleAdsAdGroupName Google Ads ad group name The ad group name attributed to the conversion event.
57 googleAdsAdNetworkType Google Ads ad network type The advertising network type of the conversion. An enumeration which includes 'Google search', 'Search partners', 'Google Display Network', 'Youtube Search', 'Youtube Videos', 'Cross-network', 'Social', and '(universal campaign)'.
58 googleAdsCampaignType Google Ads campaign type The campaign type for the Google Ads campaign attributed to the conversion event. Campaign types determine where customers see your ads and the settings and options available to you in Google Ads. Campaign type is an enumeration that includes: Search, Display, Shopping, Video, Discovery, App, Smart, Hotel, Local, and Performance Max. To learn more, see https://support.google.com/google-ads/answer/2567043.
59 googleAdsCreativeId Google Ads creative ID The ID of the Google Ads creative attributed to the conversion event. Creative IDs identify individual ads.
60 googleAdsCustomerId Google Ads customer ID The Customer ID from Google Ads for the campaign that led to conversion event. Customer IDs in Google Ads uniquely identify Google Ads accounts.
61 googleAdsKeyword Google Ads keyword text The matched keyword that led to the conversion event. Keywords are words or phrases describing your product or service that you choose to get your ad in front of the right customers. To learn more about Keywords, see <https://support.google.com/google-ads/answer/6323>.
62 googleAdsQuery Google Ads query The search query that led to the conversion event.
63 groupId Group ID The player group ID in a game for an event. Populated by the event parameter 'group_id'.
64 hostName Hostname Includes the subdomain and domain names of a URL; for example, the Host Name of www.example.com/contact.html is www.example.com.
65 hour Hour The two-digit hour of the day that the event was logged. This dimension ranges from 0-23 and is reported in your property's timezone.
66 isConversionEvent Is conversion event The string 'true' if the event is a conversion. Events are marked as conversions at collection time; changes to an event's conversion marking apply going forward. You can mark any event as a conversion in Google Analytics, and some events (i.e. first_open, purchase) are marked as conversions by default. To learn more, see <https://support.google.com/analytics/answer/9267568>.
67 itemAffiliation Item affiliation The name or code of the affiliate (partner/vendor; if any) associated with an individual item. Populated by the 'affiliation' item parameter.
68 itemBrand Item brand Brand name of the item.
69 itemCategory Item category The hierarchical category in which the item is classified. For example, in Apparel/Mens/Summer/Shirts/T-shirts, Apparel is the item category.
70 itemCategory2 Item category 2 The hierarchical category in which the item is classified. For example, in Apparel/Mens/Summer/Shirts/T-shirts, Mens is the item category 2.
71 itemCategory3 Item category 3 The hierarchical category in which the item is classified. For example, in Apparel/Mens/Summer/Shirts/T-shirts, Summer is the item category 3.
72 itemCategory4 Item category 4 The hierarchical category in which the item is classified. For example, in Apparel/Mens/Summer/Shirts/T-shirts, Shirts is the item category 4.
73 itemCategory5 Item category 5 The hierarchical category in which the item is classified. For example, in Apparel/Mens/Summer/Shirts/T-shirts, T-shirts is the item category 5.
74 itemId Item ID The ID of the item.
75 itemListId Item list ID The ID of the item list.
76 itemListName Item list name The name of the item list.
77 itemName Item name The name of the item.
78 itemPromotionCreativeName Item promotion creative name The name of the item-promotion creative.
79 itemPromotionId Item promotion ID The ID of the item promotion.
80 itemPromotionName Item promotion name The name of the promotion for the item.
81 itemVariant Item variant The specific variation of a product. e.g., XS, S, M, L for size; or Red, Blue, Green, Black for color. Populated by the 'item_variant' parameter.
82 landingPage Landing page The page path + query string associated with the first pageview in a session.
83 language Language The language setting of the user's browser or device. e.g. English
84 languageCode Language code The language setting (ISO 639) of the user's browser or device. e.g. 'en-us'
85 level Level The player's level in a game. Populated by the event parameter 'level'.
86 linkClasses Link classes The HTML class attribute for an outbound link. For example if a user clicks a link '<a class="center" href="www.youtube.com">', this dimension will return 'center'. Automatically populated if Enhanced Measurement is enabled. Populated by the event parameter 'link_classes'.
87 linkDomain Link domain The destination domain of the outbound link. For example if a user clicks a link '<a href="www.youtube.com">', this dimension will return 'youtube.com'. Automatically populated if Enhanced Measurement is enabled. Populated by the event parameter 'link_domain'.
88 linkId Link ID The HTML id attribute for an outbound link or file download. For example if a user clicks a link '<a id="socialLinks" href="www.youtube.com">', this dimension will return 'socialLinks'. Automatically populated if Enhanced Measurement is enabled. Populated by the event parameter 'link_id'.
89 linkText Link text The link text of the file download. Automatically populated if Enhanced Measurement is enabled. Populated by the event parameter 'link_text'.
90 linkUrl Link URL The full url for an outbound link or file download. For example if a user clicks a link '<a href="https://www.youtube.com/results?search_query=analytics">', this dimension will return 'https://www.youtube.com/results?search_query=analytics'. Automatically populated if Enhanced Measurement is enabled. Populated by the event parameter 'link_url'.
91 manualAdContent Manual ad content The ad content attributed to the conversion event. Populated by the utm_content parameter.
92 manualTerm Manual term The term attributed to the conversion event. Populated by the utm_term parameter.
93 medium Medium The medium attributed to the conversion event.
94 method Method The method by which an event was triggered. Populated by the event parameter 'method'.
95 minute Minute The two-digit minute of the hour that the event was logged. This dimension ranges from 0-59 and is reported in your property's timezone.
96 mobileDeviceBranding Device brand Manufacturer or branded name (examples: Samsung, HTC, Verizon, T-Mobile).
97 mobileDeviceMarketingName Device The branded device name (examples: Galaxy S10 or P30 Pro).
98 mobileDeviceModel Mobile model The mobile device model name (examples: iPhone X or SM-G950F).
99 month Month The month of the event, a two digit integer from 01 to 12.
100 newVsReturning New / returning New users have 0 previous sessions, and returning users have 1 or more previous sessions. This dimension returns two values: 'new' or 'returning'.
101 nthDay Nth day The number of days since the start of the date range.
102 nthHour Nth hour The number of hours since the start of the date range. The starting hour is 0000.
103 nthMinute Nth minute The number of minutes since the start of the date range. The starting minute is 0000.
104 nthMonth Nth month The number of months since the start of a date range. The starting month is 0000.
105 nthWeek Nth week A number representing the number of weeks since the start of a date range.
106 nthYear Nth year The number of years since the start of the date range. The starting year is 0000.
107 operatingSystem Operating system The operating systems used by visitors to your app or website. Includes desktop and mobile operating systems such as Windows and Android.
108 operatingSystemVersion OS version The operating system versions used by visitors to your website or app. For example, Android 10's version is 10, and iOS 13.5.1's version is 13.5.1.
109 operatingSystemWithVersion Operating system with version The operating system and version. For example, Android 10 or Windows 7.
110 orderCoupon Order coupon Code for the order-level coupon.
111 outbound Outbound Returns 'true' if the link lead to a site is not a part of the property’s domain. Automatically populated if Enhanced Measurement is enabled. Populated by the event parameter 'outbound'.
112 pageLocation Page location The protocol, hostname, page path, and query string for web pages visited; for example, the pageLocation portion of https://www.example.com/store/contact-us?query_string=true is https://www.example.com/store/contact-us?query_string=true. Populated by the event parameter 'page_location'.
113 pagePath Page path The portion of the URL between the hostname and query string for web pages visited; for example, the pagePath portion of https://www.example.com/store/contact-us?query_string=true is /store/contact-us.
114 pagePathPlusQueryString Page path + query string The portion of the URL following the hostname for web pages visited; for example, the pagePathPlusQueryString portion of https://www.example.com/store/contact-us?query_string=true is /store/contact-us?query_string=true.
115 pageReferrer Page referrer The full referring URL including the hostname and path. This referring URL is the user's previous URL and can be this website's domain or other domains. Populated by the event parameter 'page_referrer'.
116 pageTitle Page title The web page titles used on your site.
117 percentScrolled Percent scrolled The percentage down the page that the user has scrolled (for example, '90'). Automatically populated if Enhanced Measurement is enabled. Populated by the event parameter 'percent_scrolled'.
118 platform Platform The platform on which your app or website ran; for example, web, iOS, or Android. To determine a stream's type in a report, use both platform and streamId.
119 platformDeviceCategory Platform / device category The platform and type of device on which your website or mobile app ran. (example: Android / mobile)
120 region Region The geographic region from which the user activity originated, derived from their IP address.
121 screenResolution Screen resolution The screen resolution of the user's monitor. For example, 1920x1080.
122 searchTerm Search term The term searched by the user. For example if the user visits '/some-page.html?q=some-term', this dimension returns 'some-term'. Automatically populated if Enhanced Measurement is enabled. Populated by the event parameter 'search_term'.
123 sessionCampaignId Session campaign ID The marketing campaign id for a session. Includes Google Ads Campaigns.
124 sessionCampaignName Session campaign The marketing campaign name for a session. Includes Google Ads and Manual Campaigns.
125 sessionDefaultChannelGrouping Session default channel grouping The session's default channel grouping is based primarily on source and medium. An enumeration which includes 'Direct', 'Organic Search', 'Paid Social', 'Organic Social', 'Email', 'Affiliates', 'Referral', 'Paid Search', 'Video', and 'Display'.
126 sessionGoogleAdsAccountName Session Google Ads account name The Account name from Google Ads that led to the session. Corresponds to customer.descriptive_name in the Google Ads API.
127 sessionGoogleAdsAdGroupId Session Google Ads ad group ID The Ad Group Id in Google Ads for a session.
128 sessionGoogleAdsAdGroupName Session Google Ads ad group name The Ad Group Name in Google Ads for a session.
129 sessionGoogleAdsAdNetworkType Session Google Ads ad network type The advertising network that led to the session. An enumeration which includes 'Google search', 'Search partners', 'Google Display Network', 'Youtube Search', 'Youtube Videos', 'Cross-network', 'Social', and '(universal campaign)'.
130 sessionGoogleAdsCampaignType Session Google Ads campaign type The campaign type for the Google Ads campaign that led to this session. Campaign types determine where customers see your ads and the settings and options available to you in Google Ads. Campaign type is an enumeration that includes: Search, Display, Shopping, Video, Discovery, App, Smart, Hotel, Local, and Performance Max. To learn more, see https://support.google.com/google-ads/answer/2567043.
131 sessionGoogleAdsCreativeId Session Google Ads creative ID The ID of the Google Ads creative that lead to a session on your website or app. Creative IDs identify individual ads.
132 sessionGoogleAdsCustomerId Session Google Ads customer ID The Customer ID from Google Ads that led to the session. Customer IDs in Google Ads uniquely identify Google Ads accounts.
133 sessionGoogleAdsKeyword Session Google Ads keyword text The matched keyword that led to the session. Keywords are words or phrases describing your product or service that you choose to get your ad in front of the right customers. To learn more about Keywords, see <https://support.google.com/google-ads/answer/6323>.
134 sessionGoogleAdsQuery Session Google Ads query The search query that led to the session.
135 sessionManualAdContent Session manual ad content The ad content that led to a session. Populated by the utm_content parameter.
136 sessionManualTerm Session manual term The term that led to a session. Populated by the utm_term parameter.
137 sessionMedium Session medium The medium that initiated a session on your website or app.
138 sessionSource Session source The source that initiated a session on your website or app.
139 sessionSourceMedium Session source / medium The combined values of the dimensions 'sessionSource' and 'sessionMedium'.
140 sessionSourcePlatform Session source platform The source platform of the session's campaign. Please do not depend on this field returning 'Manual' for traffic that uses UTMs; this field will update from returning 'Manual' to returning '(not set)' for an upcoming feature launch.
141 shippingTier Shipping tier The shipping tier (e.g. Ground, Air, Next-day) selected for delivery of the purchased item. Populated by the 'shipping_tier' event parameter.
142 signedInWithUserId Signed in with user ID The string 'yes' if the user signed in with the User-ID feature. To learn more about User-ID, see <https://support.google.com/analytics/answer/9213390>.
143 source Source The source attributed to the conversion event.
144 sourceMedium Source / medium The combined values of the dimensions 'source' and 'medium'.
145 sourcePlatform Source platform The source platform of the conversion event's campaign. Please do not depend on this field returning 'Manual' for traffic that uses UTMs; this field will update from returning 'Manual' to returning '(not set)' for an upcoming feature launch.
146 streamId Stream ID The numeric data stream identifier for your app or website.
147 streamName Stream name The data stream name for your app or website.
148 testDataFilterName Test data filter name The name of data filters in testing state. You use data filters to include or exclude event data from your reports based on event-parameter values. To learn more, see <https://support.google.com/analytics/answer/10108813>.
149 transactionId Transaction ID The ID of the ecommerce transaction.
150 unifiedPagePathScreen Page path and screen class The page path (web) or screen class (app) on which the event was logged.
151 unifiedPageScreen Page path + query string and screen class The page path and query string (web) or screen class (app) on which the event was logged.
152 unifiedScreenClass Page title and screen class The page title (web) or screen class (app) on which the event was logged.
153 unifiedScreenName Page title and screen name The page title (web) or screen name (app) on which the event was logged.
154 userAgeBracket Age User age brackets.
155 userGender Gender User gender.
156 videoProvider Video provider The source of the video (for example, 'youtube'). Automatically populated for embedded videos if Enhanced Measurement is enabled. Populated by the event parameter 'video_provider'.
157 videoTitle Video title The title of the video. Automatically populated for embedded videos if Enhanced Measurement is enabled. Populated by the event parameter 'video_title'.
158 videoUrl Video URL The url of the video. Automatically populated for embedded videos if Enhanced Measurement is enabled. Populated by the event parameter 'video_url'.
159 virtualCurrencyName Virtual currency name The name of a virtual currency with which the user is interacting. i.e. spending or purchasing gems in a game. Populated by the 'virtual_currency_name' event parameter.
160 visible Visible Returns 'true' if the content is visible. Automatically populated for embedded videos if Enhanced Measurement is enabled. Populated by the event parameter 'visible'.
161 week Week The week of the event, a two-digit number from 01 to 53. Each week starts on Sunday. January 1st is always in week 01. The first and last week of the year have fewer than 7 days in most years. Weeks other than the first and the last week of the year always have 7 days. For years where January 1st is a Sunday, the first week of that year and the last week of the prior year have 7 days.
162 year Year The four-digit year of the event e.g. 2020.

View the metrics from your property

To view all the metrics in your GA4 property you can simply filter the Pandas dataframe to return only those lines where the Type column contains the value Metric. The API name values shown here can be used in any GAPandas4 queries you create.

metrics = metadata[metadata['Type']=='Metric']
metrics[['Data type', 'API Name', 'UI Name', 'Description']]
Data type API Name UI Name Description
163 TYPE_INTEGER active1DayUsers 1-day active users The number of distinct active users on your site or app within a 1 day period. The 1 day period includes the last day in the report's date range. Note: this is the same as Active Users.
164 TYPE_INTEGER active28DayUsers 28-day active users The number of distinct active users on your site or app within a 28 day period. The 28 day period includes the last day in the report's date range.
165 TYPE_INTEGER active7DayUsers 7-day active users The number of distinct active users on your site or app within a 7 day period. The 7 day period includes the last day in the report's date range.
166 TYPE_INTEGER activeUsers Active users The number of distinct users who visited your site or app.
168 TYPE_MILLISECONDS adUnitExposure Ad unit exposure The time that an ad unit was exposed to a user, in milliseconds.
167 TYPE_INTEGER addToCarts Add-to-carts The number of times users added items to their shopping carts.
169 TYPE_CURRENCY averagePurchaseRevenue Average purchase revenue The average purchase revenue in the transaction group of events.
170 TYPE_CURRENCY averagePurchaseRevenuePerPayingUser ARPPU Average revenue per paying user (ARPPU) is the total purchase revenue per active user that logged a purchase event. The summary metric is for the time period selected.
171 TYPE_CURRENCY averagePurchaseRevenuePerUser Average purchase revenue per user The average purchase revenue per active user is the total purchase revenue per active user that logged any event. The summary metric is for the time period selected.
172 TYPE_CURRENCY averageRevenuePerUser ARPU Average revenue per active user (ARPU). The summary metric is for the time period selected. ARPU uses Total Revenue and includes AdMob estimated earnings.
173 TYPE_SECONDS averageSessionDuration Average session duration The average duration (in seconds) of users' sessions.
174 TYPE_FLOAT bounceRate Bounce rate The percentage of sessions that were not engaged ((Sessions Minus Engaged sessions) divided by Sessions). This metric is returned as a fraction; for example, 0.2761 means 27.61% of sessions were bounces.
175 TYPE_FLOAT cartToViewRate Cart-to-view rate The number of users who added a product(s) to their cart divided by the number of users who viewed the same product(s). This metric is returned as a fraction; for example, 0.1132 means 11.32% of users who viewed a product also added the same product to their cart.
176 TYPE_INTEGER checkouts Checkouts The number of times users started the checkout process.
177 TYPE_INTEGER cohortActiveUsers Cohort active users The number of users in the cohort who are active in the time window corresponding to the cohort nth day/week/month. For example for the row where cohortNthWeek = 0001, this metric is the number of users (in the cohort) who are active in week 1.
178 TYPE_INTEGER cohortTotalUsers Cohort total users The total number of users in the cohort. This metric is the same value in every row of the report for each cohort. Because cohorts are defined by a shared acquisition date, cohortTotalUsers is the same as cohortActiveUsers for the cohort's selection date range. For report rows later than the ochort's selection range, it is typical for cohortActiveUsers to be smaller than cohortTotalUsers. This difference represents users from the cohort that were not active for the later date. cohortTotalUsers is commonly used in the metric expression cohortActiveUsers/cohortTotalUsers to compute a user retention fraction for the cohort. The relationship between activeUsers and totalUsers is not equivalent to the relationship between cohortActiveUsers and cohortTotalUsers.
179 TYPE_FLOAT conversions Conversions The count of conversion events. Events are marked as conversions at collection time; changes to an event's conversion marking apply going forward. You can mark any event as a conversion in Google Analytics, and some events (i.e. first_open, purchase) are marked as conversions by default. To learn more, see <https://support.google.com/analytics/answer/9267568>.
180 TYPE_INTEGER crashAffectedUsers Crash-affected users The number of users that logged a crash in this row of the report. For example if the report is time series by date, this metrics reports total users with at least one crash on this date. Crashes are events with the name "app_exception".
181 TYPE_INTEGER crashFreeUsersRate Crash-free users rate The number of users without crash events (in this row of the report) divided by the total number of users. This metric is returned as a fraction; for example, 0.9243 means 92.43% of users were crash-free.
182 TYPE_FLOAT dauPerMau DAU / MAU The rolling percent of 30-day active users who are also 1-day active users. This metric is returned as a fraction; for example, 0.113 means 11.3% of 30-day active users were also 1-day active users.
183 TYPE_FLOAT dauPerWau DAU / WAU The rolling percent of 7-day active users who are also 1-day active users. This metric is returned as a fraction; for example, 0.082 means 8.2% of 7-day active users were also 1-day active users.
184 TYPE_INTEGER ecommercePurchases Ecommerce purchases The number of times users completed a purchase. This metric counts 'purchase' events; this metric does not count 'in_app_purchase' and subscription events.
185 TYPE_INTEGER engagedSessions Engaged sessions The number of sessions that lasted longer than 10 seconds, or had a conversion event, or had 2 or more screen views.
186 TYPE_FLOAT engagementRate Engagement rate The percentage of engaged sessions (Engaged sessions divided by Sessions). This metric is returned as a fraction; for example, 0.7239 means 72.39% of sessions were engaged sessions.
187 TYPE_INTEGER eventCount Event count The count of events.
188 TYPE_FLOAT eventCountPerUser Event count per user The average number of events per user (Event count divided by Active users).
190 TYPE_FLOAT eventValue Event value The sum of the event parameter named 'value'.
189 TYPE_FLOAT eventsPerSession Events per session The average number of events per session (Event count divided by Sessions).
191 TYPE_FLOAT firstTimePurchaserConversionRate First-time purchaser conversion The percentage of active users who made their first purchase. This metric is returned as a fraction; for example, 0.092 means 9.2% of active users were first time purchasers.
192 TYPE_INTEGER firstTimePurchasers First time purchasers The number of users that completed their first purchase event.
193 TYPE_FLOAT firstTimePurchasersPerNewUser First-time purchasers per new user The average number of first time purchasers per new user.
195 TYPE_FLOAT itemListClickThroughRate Item list click through rate The number of users who selected a list(s) divided by the number of users who viewed the same list(s). This metric is returned as a fraction; for example, 0.2145 means 21.45% of users who viewed a list also selected the same list.
194 TYPE_INTEGER itemListClicks Item list clicks The number of times users clicked an item when it appeared in a list.
196 TYPE_INTEGER itemListViews Item list views The number of times the item list was viewed.
198 TYPE_FLOAT itemPromotionClickThroughRate Item promotion click through rate The number of users who selected a promotion(s) divided by the number of users who viewed the same promotion(s). This metric is returned as a fraction; for example, 0.1382 means 13.82% of users who viewed a promotion also selected the promotion.
197 TYPE_INTEGER itemPromotionClicks Item promotion clicks The number of times an item promotion was clicked.
199 TYPE_INTEGER itemPromotionViews Item promotion views The number of times an item promotion was viewed.
200 TYPE_INTEGER itemPurchaseQuantity Item purchase quantity The number of units for a single item included in purchase events.
201 TYPE_CURRENCY itemRevenue Item revenue The total revenue from items only. 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.
202 TYPE_INTEGER itemViews Item views The number of times the item details were viewed.
203 TYPE_INTEGER newUsers New users The number of users who interacted with your site or launched your app for the first time (event triggered: first_open or first_visit).
204 TYPE_FLOAT organicGoogleSearchAveragePosition Organic google search average position The average ranking of your website URLs for the query reported from Search Console. For example, if your site's URL appears at position 3 for one query and position 7 for another query, the average position would be 5 (3+7/2). This metric requires an active Search Console link.
206 TYPE_FLOAT organicGoogleSearchClickThroughRate Organic google search click through rate The organic Google Search click through rate reported from Search Console. Click through rate is clicks per impression. This metric is returned as a fraction; for example, 0.0588 means about 5.88% of impressions resulted in a click. This metric requires an active Search Console link.
205 TYPE_INTEGER organicGoogleSearchClicks Organic google search clicks The number of organic Google Search clicks reported from Search Console. This metric requires an active Search Console link.
207 TYPE_INTEGER organicGoogleSearchImpressions Organic google search impressions The number of organic Google Search impressions reported from Search Console. This metric requires an active Search Console link.
208 TYPE_INTEGER publisherAdClicks Publisher ad clicks The number of ad_click events.
209 TYPE_INTEGER publisherAdImpressions Publisher ad impressions The number of ad_impression events.
211 TYPE_CURRENCY purchaseRevenue Purchase revenue The sum of revenue from purchases 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.
212 TYPE_FLOAT purchaseToViewRate Purchase-to-view rate The number of users who purchased a product(s) divided by the number of users who viewed the same product(s). This metric is returned as a fraction; for example, 0.128 means 12.8% of users that viewed a product(s) also purchased the same product(s).
210 TYPE_FLOAT purchaserConversionRate Purchaser conversion 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.
213 TYPE_INTEGER screenPageViews Views The number of app screens or web pages your users viewed. Repeated views of a single page or screen are counted. (screen_view + page_view events).
214 TYPE_FLOAT screenPageViewsPerSession Views per session 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.
215 TYPE_INTEGER sessions Sessions The number of sessions that began on your site or app (event triggered: session_start).
216 TYPE_FLOAT sessionsPerUser Sessions per user The average number of sessions per user (Sessions divided by Active Users).
217 TYPE_CURRENCY shippingAmount Shipping amount Shipping amount associated with a transaction. Populated by the 'shipping' event parameter.
218 TYPE_CURRENCY taxAmount Tax amount Tax amount associated with a transaction. Populated by the 'tax' event parameter.
219 TYPE_CURRENCY totalAdRevenue Total ad revenue The total advertising revenue from both Admob and third-party sources.
220 TYPE_INTEGER totalPurchasers Total purchasers The number of users that logged purchase events for the time period selected.
221 TYPE_CURRENCY totalRevenue Total revenue The sum of revenue from purchases, subscriptions, and advertising (Purchase revenue plus Subscription revenue plus Ad revenue).
222 TYPE_INTEGER totalUsers Total users The number of distinct users who have logged at least one event, regardless of whether the site or app was in use when that event was logged.
223 TYPE_INTEGER transactions Transactions The count of transaction events with purchase revenue. Transaction events are in_app_purchase, ecommerce_purchase, purchase, app_store_subscription_renew, app_store_subscription_convert, and refund.
224 TYPE_INTEGER transactionsPerPurchaser Transactions per purchaser The average numer of transactions per purchaser.
225 TYPE_SECONDS userEngagementDuration User engagement The total amount of time (in seconds) your website or app was in the foreground of users' devices.
226 TYPE_FLOAT wauPerMau WAU / MAU The rolling percent of 30-day active users who are also 7-day active users. This metric is returned as a fraction; for example, 0.234 means 23.4% of 30-day active users were also 7-day active users.

Matt Clarke, Wednesday, June 22, 2022

Matt Clarke Matt is an Ecommerce and Marketing Director who uses data science to help in his work. Matt has a Master's degree in Internet Retailing (plus two other Master's degrees in different fields) and specialises in the technical side of ecommerce and marketing.