Team Ai
Datasetpublic

nl2sqlproj/spider2-nl2sql

Dataset Details Dataset Description This dataset consists of data for the purpose of training a model to generate SQL code in response to a natural language prompt. The qa.csv table consists of these pairs, while the <dbms>_ddl.csv tables consist of the DDLs and sample data needed to verify the validity of generated SQL queries. Dataset Sources: Spider2 Repository Paper

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes59downloads
qa.csv23119 linesDownload Raw Back to root
1,id,db_or_proj,nl_prompt,sql_query,docs,dbms20,bq011,ga4,"How many distinct pseudo users had positive engagement time  in the 7-day period ending on January 7, 2021 at 23:59:59, but had no positive engagement time in the 2-day period ending on the same date (January 7, 2021 at 23:59:59) ?","SELECT3  COUNT(DISTINCT MDaysUsers.user_pseudo_id) AS n_day_inactive_users_count4FROM5  (6    SELECT7      user_pseudo_id8    FROM9      `bigquery-public-data.ga4_obfuscated_sample_ecommerce.events_*` AS T10    CROSS JOIN11      UNNEST(T.event_params) AS event_params12    WHERE13      event_params.key = 'engagement_time_msec' AND event_params.value.int_value > 014      AND event_timestamp > UNIX_MICROS(TIMESTAMP_SUB(TIMESTAMP('2021-01-07 23:59:59'), INTERVAL 7 DAY))15      AND _TABLE_SUFFIX BETWEEN '20210101' AND '20210107'16  ) AS MDaysUsers17LEFT JOIN18  (19    SELECT20      user_pseudo_id21    FROM22      `bigquery-public-data.ga4_obfuscated_sample_ecommerce.events_*` AS T23    CROSS JOIN24      UNNEST(T.event_params) AS event_params25    WHERE26      event_params.key = 'engagement_time_msec' AND event_params.value.int_value > 027      AND event_timestamp > UNIX_MICROS(TIMESTAMP_SUB(TIMESTAMP('2021-01-07 23:59:59'), INTERVAL 2 DAY))28      AND _TABLE_SUFFIX BETWEEN '20210105' AND '20210107'29  ) AS NDaysUsers30ON MDaysUsers.user_pseudo_id = NDaysUsers.user_pseudo_id31WHERE32  NDaysUsers.user_pseudo_id IS NULL;","# GA4 - BigQuery Export schema33 34This article explains the format and schema of the Google Analytics 4 property data and the Google Analytics for Firebase data that is exported to BigQuery.35 36## Datasets37 38For each Google Analytics 4 property and each Firebase project that is linked to BigQuery, a single dataset named ""analytics_<property_id>"" is added to your BigQuery project. Property ID refers to your Analytics Property ID, which you can find in the property settings for your Google Analytics 4 property, and in App Analytics Settings in Firebase. Each Google Analytics 4 property and each app for which BigQuery exporting is enabled will export its data to that single dataset.39 40## Tables41 42Within each dataset, a table named `events_YYYYMMDD` is created each day if the Daily export option is enabled.43 44If the Streaming export option is enabled, a table named`events_intraday_YYYYMMDD`is created. This table is populated continuously as events are recorded throughout the day. This table is deleted at the end of each day once `events_YYYYMMDD` is complete.45 46Not all devices on which events are triggered send their data to Analytics on the same day the events are triggered. To account for this latency, Analytics will update the daily tables (`events_YYYYMMDD`) with events for those dates for up to three days after the dates of the events. Events will have the correct time stamp regardless of arriving late. Events that arrive after that three-day window are not recorded.47 48## Columns49 50Each column in the `events_YYYYMMDD`table represents an event-specific parameter. Note that some parameters are nested within RECORDS, and some RECORDS such as51`[items](https://support.google.com/analytics/answer/7029846?hl=en&ref_topic=9359001&sjid=16041154979191290935-EU#items)`52and53`[event_params](https://support.google.com/analytics/answer/7029846?hl=en&ref_topic=9359001&sjid=16041154979191290935-EU#event_params)`54are repeatable. Table columns are described below.55 56### event57 58The event fields contain information that uniquely identifies an event.59 60| Field name | Data type | Description |61|---|---|---|62| batch_event_index | INTEGER | A number indicating the sequential order of each event within a batch based on their order of occurrence on the device. |63| batch_ordering_id | INTEGER | A monotonically increasing number that is incremented each time a network request is sent from a given page. |64| batch_page_id | INTEGER | A sequential number assigned to a page that increases for each subsequent page within an engagement. |65| event_date | STRING | The date when the event was logged (YYYYMMDD format in the registered timezone of your app). |66| event_timestamp | INTEGER | The time (in microseconds, UTC) when the event was logged on the client. |67| event_previous_timestamp | INTEGER | The time (in microseconds, UTC) when the event was previously logged on the client. |68| event_name | STRING | The name of the event. |69| event_value_in_usd | FLOAT | The currency-converted value (in USD) of the event's ""value"" parameter. |70| event_bundle_sequence_id | INTEGER | The sequential ID of the bundle in which these events were uploaded. |71| event_server_timestamp_offset | INTEGER | Timestamp offset between collection time and upload time in micros. |72 73#### event_params RECORD74 75The event_params RECORD can store campaign-level and contextual event parameters as well as any user-defined event parameters. The event_params RECORD is repeated for each key that is associated with an event. The set of parameters stored in the event_params RECORD is unique to each implementation. To see the complete list of event parameters for your implementation, query the event parameter list.76 77| Field name | Data type | Description |78|---|---|---|79| event_params.key | STRING | The name of the event parameter. |80| event_params.value | RECORD | A record containing the event parameter's value. |81| event_params.value.string_value | STRING | If the event parameter is represented by a string, such as a URL or campaign name, it is populated in this field. |82| event_params.value.int_value | INTEGER | If the event parameter is represented by an integer, it is populated in this field. |83| event_params.value.double_value | FLOAT | If the event parameter is represented by a double value, it is populated in this field. |84| event_params.value.float_value | FLOAT | If the event parameter is represented by a floating point value, it is populated in this field. This field is not currently in use. |85 86#### item_params RECORD87 88The item_params RECORD can store item parameters as well as any user-defined item parameters. The set of parameters stored in the item_params RECORD is unique to each implementation.89 90| Field name | Data type | Description |91|---|---|---|92| item_params.key | STRING | The name of the item parameter. |93| item_params.value | RECORD | A record containing the item parameter’s value. |94| item_params.value.string_value | STRING | If the item parameter is represented by a string, it is populated in this field. |95| item_params.value.int_value | INTEGER | If the item parameter is represented by an integer, it is populated in this field. |96| item_params.value.double_value | FLOAT | If the item parameter is represented by a double value, it is populated in this field. |97| item_params.value.float_value | FLOAT | If the item parameter is represented by a floating point value, it is populated in this field. | 98 99### user100 101The user fields contain information that uniquely identifies the user associated with the event.102 103| Field name | Data type | Description |104|---|---|---|105| is_active_user | BOOLEAN | Whether the user was active (True) or inactive (False) at any point in the calendar day Included in only the daily tables ( events_YYYYMMDD) . |106| user_id | STRING | The unique ID assigned to a user. |107| user_pseudo_id | STRING | The pseudonymous id (e.g., app instance ID) for the user. |108| user_first_touch_timestamp | INTEGER | The time (in microseconds) at which the user first opened the app or visited the site. |109 110#### privacy_info fields111 112The privacy_info fields contain information based on the consent status of a user when consent mode is enabled .113 114| Field name | Data type | Description |115|---|---|---|116| privacy_info.ads_storage | STRING | Whether ad targeting is enabled for a user. Possible values: Yes, No, Unset |117| privacy_info.analytics_storage | STRING | Whether Analytics storage is enabled for the user. Possible values: Yes, No, Unset |118| privacy_info.uses_transient_token | STRING | Whether a web user has denied Analytics storage and the developer has enabled measurement without cookies based on transient tokens in server data. Possible values: Yes, No, Unset |119 120#### user_properties RECORD121 122The user_properties RECORD contains any user properties that you have set. It is repeated for each key that is associated with a user.123 124| Field name | Data type | Description |125|---|---|---|126| user_properties.key | STRING | The name of the user property. |127| user_properties.value | RECORD | A record for the user property value. |128| user_properties.value.string_value | STRING | The string value of the user property. |129| user_properties.value.int_value | INTEGER | The integer value of the user property. |130| user_properties.value.double_value | FLOAT | The double value of the user property. |131| user_properties.value.float_value | FLOAT | This field is currently unused. |132| user_properties.value.set_timestamp_micros | INTEGER | The time (in microseconds) at which the user property was last set. |133 134#### user_ltv RECORD135 136The user_ltv RECORD contains Lifetime Value information about the user. This RECORD is not populated in intraday tables.137 138| Field name | Data type | Description |139|---|---|---|140| user_ltv.revenue | FLOAT | The Lifetime Value (revenue) of the user. This field is not populated in intraday tables. |141| user_ltv.currency | STRING | The Lifetime Value (currency) of the user. This field is not populated in intraday tables. | 142 143### device144 145The device RECORD contains information about the device from which the event originated.146 147| Field name | Data type | Description |148|---|---|---|149| device.category | STRING | The device category (mobile, tablet, desktop). |150| device.mobile_brand_name | STRING | The device brand name. |151| device.mobile_model_name | STRING | The device model name. |152| device.mobile_marketing_name | STRING | The device marketing name. |153| device.mobile_os_hardware_model | STRING | The device model information retrieved directly from the operating system. |154| device.operating_system | STRING | The operating system of the device. |155| device.operating_system_version | STRING | The OS version. |156| device.vendor_id | STRING | IDFV (present only if IDFA is not collected). |157| device.advertising_id | STRING | Advertising ID/IDFA. |158| device.language | STRING | The OS language. |159| device.time_zone_offset_seconds | INTEGER | The offset from GMT in seconds. |160| device.is_limited_ad_tracking | BOOLEAN | The device's Limit Ad Tracking setting. On iOS14+, returns false if the IDFA is non-zero. |161| device.web_info.browser | STRING | The browser in which the user viewed content. |162| device.web_info.browser_version | STRING | The version of the browser in which the user viewed content. |163| device.web_info.hostname | STRING | The hostname associated with the logged event. | 164 165### geo166 167The geo RECORD contains information about the geographic location where the event was initiated.168 169| Field name | Data type | Description |170|---|---|---|171| geo.continent | STRING | The continent from which events were reported, based on IP address. |172| geo.sub_continent | STRING | The subcontinent from which events were reported, based on IP address. |173| geo.country | STRING | The country from which events were reported, based on IP address. |174| geo.region | STRING | The region from which events were reported, based on IP address. |175| geo.metro | STRING | The metro from which events were reported, based on IP address. |176| geo.city | STRING | The city from which events were reported, based on IP address. | 177 178### app_info179 180The app_info RECORD contains information about the app in which the event was initiated. | Field name | Data type | Description |181|---|---|---|182| app_info.id | STRING | The package name or bundle ID of the app. |183| app_info.firebase_app_id | STRING | The Firebase App ID associated with the app |184| app_info.install_source | STRING | The store that installed the app. |185| app_info.version | STRING | The app's versionName (Android) or short bundle version. | 186 187### collected_traffic_source188 189The collected_traffic_source RECORD contains the traffic source data that was collected with the event.190 191| Field name | Data type | Description |192|---|---|---|193| manual_campaign_id | STRING | The manual campaign id (utm_id) that was collected with the event. |194| manual_campaign_name | STRING | The manual campaign name (utm_campaign) that was collected with the event. |195| manual_source | STRING | The manual campaign source (utm_source) that was collected with the event. Also includes parsed parameters from referral params, not just UTM values. |196| manual_medium | STRING | The manual campaign medium (utm_medium) that was collected with the event. Also includes parsed parameters from referral params, not just UTM values. |197| manual_term | STRING | The manual campaign keyword/term (utm_term) that was collected with the event. |198| manual_content | STRING | The additional manual campaign metadata (utm_content) that was collected with the event. |199| manual_creative_format | STRING | The manual campaign creative format (utm_creative_format) that was collected with the event. |200| manual_marketing_tactic | STRING | The manual campaign marketing tactic (utm_marketing_tactic) that was collected with the event. |201| manual_source_platform | STRING | The manual campaign source platform (utm_source_platform) that was collected with the event. |202| gclid | STRING | The Google click identifier that was collected with the event. |203| dclid | STRING | The DoubleClick Click Identifier for Display and Video 360 and Campaign Manager 360 that was collected with the event. |204| srsltid | STRING | The Google Merchant Center identifier that was collected with the event. | 205 206### session_traffic_source_last_click207 208The session_traffic_source_last_click RECORD contains the last-click attributed session traffic source data across Google ads and manual contexts, where available.209 210| Field Name | Data Type | Description |211|---|---|---|212| session_traffic_source_last_click. manual_campaign.campaign_id | STRING | The ID of the last clicked manual campaign |213| session_traffic_source_last_click. manual_campaign.campaign_name | STRING | The name of the last clicked manual campaign |214| session_traffic_source_last_click. manual_campaign.medium | STRING | The medium of the last clicked manual campaign (e.g., paid search, organic search, email) |215| session_traffic_source_last_click. manual_campaign.term | STRING | The keyword/search term of the last clicked manual campaign |216| session_traffic_source_last_click. manual_campaign.content | STRING | Additional metadata of the last clicked manual campaign |217| session_traffic_source_last_click. manual_campaign.source_platform | STRING | The platform of the last clicked manual campaign (e.g., search engine, social media) |218| session_traffic_source_last_click. manual_campaign.source | STRING | The specific source within the platform of the last clicked manual campaign |219| session_traffic_source_last_click. manual_campaign.creative_format | STRING | The format of the creative of the last clicked manual campaign |220| session_traffic_source_last_click. manual_campaign.marketing_tactic | STRING | The marketing tactic of the last clicked manual campaign |221| session_traffic_source_last_click. google_ads_campaign.customer_id | STRING | The customer ID associated with the Google Ads account |222| session_traffic_source_last_click. google_ads_campaign.account_name | STRING | The name of the Google Ads account |223| session_traffic_source_last_click. google_ads_campaign.campaign_id | STRING | The ID of the Google Ads campaign |224| session_traffic_source_last_click. google_ads_campaign.campaign_name | STRING | The name of the Google Ads campaign |225| session_traffic_source_last_click. google_ads_campaign.ad_group_id | STRING | The ID of the ad group within the Google Ads campaign |226| session_traffic_source_last_click. google_ads_campaign.ad_group_name | STRING | The name of the ad group within the Google Ads campaign | 227 228### traffic_source229 230The traffic_source RECORD contains information about the traffic source that first acquired the user. This record is not populated in intraday tables. Note: The traffic_source values do not change if the user interacts with subsequent campaigns after installation.231 232| Field name | Data type | Description |233|---|---|---|234| traffic_source.name | STRING | Name of the marketing campaign that first acquired the user. This field is not populated in intraday tables. |235| traffic_source.medium | STRING | Name of the medium (paid search, organic search, email, etc.) that first acquired the user. This field is not populated in intraday tables. |236| traffic_source.source | STRING | Name of the network that first acquired the user. This field is not populated in intraday tables. | 237 238### stream and platform239 240The stream and platform fields contain information about the stream and the app platform.241 242| Field name | Data type | Description |243|---|---|---|244| stream_id | STRING | The numeric ID of the data stream from which the event originated. |245| platform | STRING | The data stream platform (Web, IOS or Android) from which the event originated. | 246 247### ecommerce248 249This ecommerce RECORD contains information about any ecommerce events that have been setup on a website or app.250 251| Field name | Data type | Description |252|---|---|---|253| ecommerce.total_item_quantity | INTEGER | Total number of items in this event, which is the sum of items.quantity. |254| ecommerce.purchase_revenue_in_usd | FLOAT | Purchase revenue of this event, represented in USD with standard unit. Populated for purchase event only. |255| ecommerce.purchase_revenue | FLOAT | Purchase revenue of this event, represented in local currency with standard unit. Populated for purchase event only. |256| ecommerce.refund_value_in_usd | FLOAT | The amount of refund in this event, represented in USD with standard unit. Populated for refund event only. |257| ecommerce.refund_value | FLOAT | The amount of refund in this event, represented in local currency with standard unit. Populated for refund event only. |258| ecommerce.shipping_value_in_usd | FLOAT | The shipping cost in this event, represented in USD with standard unit. |259| ecommerce.shipping_value | FLOAT | The shipping cost in this event, represented in local currency. |260| ecommerce.tax_value_in_usd | FLOAT | The tax value in this event, represented in USD with standard unit. |261| ecommerce.tax_value | FLOAT | The tax value in this event, represented in local currency with standard unit. |262| ecommerce.transaction_id | STRING | The transaction ID of the ecommerce transaction. |263| ecommerce.unique_items | INTEGER | The number of unique items in this event, based on item_id, item_name, and item_brand. | 264 265### items266 267The items RECORD contains information about items included in an event. It is repeated for each item.268 269| Field name | Data type | Description |270|---|---|---|271| items.item_id | STRING | The ID of the item. |272| items.item_name | STRING | The name of the item. |273| items.item_brand | STRING | The brand of the item. |274| items.item_variant | STRING | The variant of the item. |275| items.item_category | STRING | The category of the item. |276| items.item_category2 | STRING | The sub category of the item. |277| items.item_category3 | STRING | The sub category of the item. |278| items.item_category4 | STRING | The sub category of the item. |279| items.item_category5 | STRING | The sub category of the item. |280| items.price_in_usd | FLOAT | The price of the item, in USD with standard unit. |281| items.price | FLOAT | The price of the item in local currency. |282| items.quantity | INTEGER | The quantity of the item. Quantity set to 1 if not specified. |283| items.item_revenue_in_usd | FLOAT | The revenue of this item, calculated as price_in_usd * quantity. It is populated for purchase events only, in USD with standard unit. |284| items.item_revenue | FLOAT | The revenue of this item, calculated as price * quantity. It is populated for purchase events only, in local currency with standard unit. |285| items.item_refund_in_usd | FLOAT | The refund value of this item, calculated as price_in_usd * quantity. It is populated for refund events only, in USD with standard unit. |286| items.item_refund | FLOAT | The refund value of this item, calculated as price * quantity. It is populated for refund events only, in local currency with standard unit. |287| items.coupon | STRING | Coupon code applied to this item. |288| items.affiliation | STRING | A product affiliation to designate a supplying company or brick and mortar store location. |289| items.location_id | STRING | The location associated with the item. |290| items.item_list_id | STRING | The ID of the list in which the item was presented to the user. |291| items.item_list_name | STRING | The name of the list in which the item was presented to the user. |292| Items.item_list_index | STRING | The position of the item in a list. |293| items.promotion_id | STRING | The ID of a product promotion. |294| items.promotion_name | STRING | The name of a product promotion. |295| items.creative_name | STRING | The name of a creative used in a promotional spot. |296| items.creative_slot | STRING | The name of a creative slot. |297 298#### item_params RECORD299 300The item_params RECORD stores the custom item parameters that you defined. Note that predefined item parameters like item_id, item_name etc, are not included here, instead they are exported as explicit fields. The set of parameters stored in the item_params RECORD is unique to each implementation. To learn more about ecommerce implementations and the Google Analytics 4 items array, see Measure ecommerce .301 302| Field name | Data type | Description |303|---|---|---|304| items.item_params.key | STRING | The name of the item parameter. |305| items.item_params.value | RECORD | A record containing the item parameter’s value. |306| items.item_params.value.string_value | STRING | If the item parameter is represented by a string, it is populated in this field. |307| items.item_params.value.int_value | INTEGER | If the item parameter is represented by an integer, it is populated in this field. |308| items.item_params.value.double_value | FLOAT | If the item parameter is represented by a double value, it is populated in this field. |309| items.item_params.value.float_value | FLOAT | If the item parameter is represented by a floating point value, it is populated in this field. | 310 311## Rows312 313Data for a single event may be represented in one or multiple rows, depending on whether it contains repeated RECORDS. A `page_view` event with multiple314`[event_params](https://support.google.com/analytics/answer/7029846?hl=en&ref_topic=9359001&sjid=16041154979191290935-EU#event_params)`,315for example, would look similar to the following table. The initial row contains the event name, date, timestamp and other non-repeated data items. The316`[event_params](https://support.google.com/analytics/answer/7029846?hl=en&ref_topic=9359001&sjid=16041154979191290935-EU#event_params)`317RECORD is repeated for each parameter associated with the event. These repeated RECORDS are populated in subsequent rows directly under the initial event row.318 319| event_date | event_timestamp | event_name | event_params.key | event_params_value.string_value |320|---|---|---|---|---|321| 20220222 | 1643673600483790 | page_view | page_location | https://example.com |322| - | - | - | page_title | Home |323| - | - | - | medium | referral |324| - | - | - | source | google |325| - | - | - | page_referrer | https://www.google.com |326| - | - | - | parameters... | values... |",snowflake3271,bq010,ga360,"Find the top-selling product among customers who bought 'Youtube Men’s Vintage Henley' in July 2017, excluding itself.","WITH GET_CUS_ID AS (328    SELECT 329        DISTINCT fullVisitorId as Henley_CUSTOMER_ID330    FROM 331        `bigquery-public-data.google_analytics_sample.ga_sessions_201707*`,332        UNNEST(hits) AS hits,333        UNNEST(hits.product) as product334    WHERE335        product.v2ProductName = ""YouTube Men's Vintage Henley""336        AND product.productRevenue IS NOT NULL337    )338 339SELECT340    product.v2ProductName AS other_purchased_products341FROM342    `bigquery-public-data.google_analytics_sample.ga_sessions_201707*` TAB_A 343    RIGHT JOIN GET_CUS_ID344    ON GET_CUS_ID.Henley_CUSTOMER_ID=TAB_A.fullVisitorId,345    UNNEST(hits) AS hits,346    UNNEST(hits.product) as product347WHERE348    TAB_A.fullVisitorId IN (349        SELECT * FROM GET_CUS_ID350    )351    AND product.v2ProductName <> ""YouTube Men's Vintage Henley""352    AND product.productRevenue IS NOT NULL353GROUP BY354    product.v2ProductName355ORDER BY356    SUM(product.productQuantity) DESC357LIMIT 1;","## Documents about Google Analytics Sample - ga_sessions358 359This article explains the format and schema of the data that is imported into BigQuery.360 361## Datasets362 363For each Analytics view that is enabled for BigQuery integration, a dataset is added using the view ID as the name.364 365## Tables366 367Within each dataset, a table is imported for each day of export. Daily tables have the format ""ga\_sessions\_YYYYMMDD"".368 369Intraday data is imported at least three times a day. Intraday tables have the format ""ga\_sessions\_intraday\_YYYYMMDD"". During the same day, each import of intraday data overwrites the previous import in the same table.370 371When the daily import is complete, the intraday table from the previous day is deleted. For the current day, until the first intraday import, there is no intraday table. If an intraday-table write fails, then the previous day's intraday table is preserved.372 373Data for the current day is not final until the daily import is complete. You may notice differences between intraday and daily data based on active user sessions that cross the time boundary of last intraday import.374 375## Rows376 377Each row within a table corresponds to a session in Analytics 360.378 379## Columns380 381The columns within the export are listed below. In BigQuery, some columns may have nested fields and messages within them.382 383| Field Name | Data Type | Description |384| --- | --- | --- |385| clientId | STRING | Unhashed version of the Client ID for a given user associated with any given visit/session. |386| fullVisitorId | STRING | The unique visitor ID. |387| visitorId | NULL | This field is deprecated. Use ""fullVisitorId"" instead. |388| userId | STRING | Overridden User ID sent to Analytics. |389| visitNumber | INTEGER | The session number for this user. If this is the first session, then this is set to 1. |390| visitId | INTEGER | An identifier for this session. This is part of the value usually stored as the _utmb cookie. This is only unique to the user. For a completely unique ID, you should use a combination of fullVisitorId and visitId. |391| visitStartTime | INTEGER | The timestamp (expressed as POSIX time). |392| date | STRING | The date of the session in YYYYMMDD format. |393| totals | RECORD | This section contains aggregate values across the session. |394| totals.bounces | INTEGER | Total bounces (for convenience). For a bounced session, the value is 1, otherwise it is null. |395| totals.hits | INTEGER | Total number of hits within the session. |396| totals.newVisits | INTEGER | Total number of new users in session (for convenience). If this is the first visit, this value is 1, otherwise it is null. |397| totals.pageviews | INTEGER | Total number of pageviews within the session. |398| totals.screenviews | INTEGER | Total number of screenviews within the session. |399| totals.sessionQualityDim | INTEGER | An estimate of how close a particular session was to transacting, ranging from 1 to 100, calculated for each session. A value closer to 1 indicates a low session quality, or far from transacting, while a value closer to 100 indicates a high session quality, or very close to transacting. A value of 0 indicates that Session Quality is not calculated for the selected time range. |400| totals.timeOnScreen | INTEGER | The total time on screen in seconds. |401| totals.timeOnSite | INTEGER | Total time of the session expressed in seconds. |402| totals.totalTransactionRevenue | INTEGER | Total transaction revenue, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |403| totals.transactionRevenue | INTEGER | This field is deprecated. Use ""totals.totalTransactionRevenue"" instead (see above). |404| totals.transactions | INTEGER | Total number of ecommerce transactions within the session. |405| totals.UniqueScreenViews | INTEGER | Total number of unique screenviews within the session. |406| totals.visits | INTEGER | The number of sessions (for convenience). This value is 1 for sessions with interaction events. The value is null if there are no interaction events in the session. |407| trafficSource | RECORD | This section contains information about the Traffic Source from which the session originated. |408| trafficSource.adContent | STRING | The ad content of the traffic source. Can be set by the utm_content URL parameter. |409| trafficSource.adwordsClickInfo | RECORD | This section contains information about the Google Ads click info if there is any associated with this session. Analytics uses the last non-direct click model. |410| trafficSource.<br>      adwordsClickInfo.adGroupId | INTEGER | The Google ad-group ID. |411| trafficSource.<br>      adwordsClickInfo.adNetworkType | STRING | Network Type. Takes one of the following values: {“Google Search"", ""Content"", ""Search partners"", ""Ad Exchange"", ""Yahoo Japan Search"", ""Yahoo Japan AFS"", “unknown”} |412| trafficSource.<br>      adwordsClickInfo.campaignId | INTEGER | The Google Ads campaign ID. |413| trafficSource.<br>      adwordsClickInfo.creativeId | INTEGER | The Google ad ID. |414| trafficSource.<br>      adwordsClickInfo.criteriaId | INTEGER | The ID for the targeting criterion. |415| trafficSource.<br>      adwordsClickInfo.criteriaParameters | STRING | Descriptive string for the targeting criterion. |416| trafficSource.<br>      adwordsClickInfo.customerId | INTEGER | The Google Ads Customer ID. |417| trafficSource.<br>      adwordsClickInfo.gclId | STRING | The Google Click ID. |418| trafficSource.<br>      adwordsClickInfo.isVideoAd | BOOLEAN | True if it is a Trueview video ad. |419| trafficSource.<br>      adwordsClickInfo.page | INTEGER | Page number in search results where the ad was shown. |420| trafficSource.<br>      adwordsClickInfo.slot | STRING | Position of the Ad. Takes one of the following values:{“RHS"", ""Top""} |421| trafficSource.<br>      adwordsClickInfo.targetingCriteria | RECORD | Google Ads targeting criteria for a click. There are multiple types of targeting criteria, but should have only one value for each criterion. |422| trafficSource.<br>      adwordsClickInfo.targetingCriteria.<br>      boomUserlistId | INTEGER | Remarketing list ID (if any) in Google Ads, derived from matching_criteria in click record. |423| trafficSource.campaign | STRING | The campaign value. Usually set by the utm_campaign URL parameter. |424| trafficSource.campaignCode | STRING | Value of the utm_id campaign tracking parameter, used for manual campaign tracking. |425| trafficSource.isTrueDirect | BOOLEAN | True if the source of the session was Direct (meaning the user typed the name of your website URL into the browser or came to your site via a bookmark), This field will also be true if 2 successive but distinct sessions have exactly the same campaign details. Otherwise NULL. |426| trafficSource.keyword | STRING | The keyword of the traffic source, usually set when the trafficSource.medium is ""organic"" or ""cpc"". Can be set by the utm_term URL parameter. |427| trafficSource.medium | STRING | The medium of the traffic source. Could be ""organic"", ""cpc"", ""referral"", or the value of the utm_medium URL parameter. |428| trafficSource.referralPath | STRING | If trafficSource.medium is ""referral"", then this is set to the path of the referrer. (The host name of the referrer is in trafficSource.source.) |429| trafficSource.source | STRING | The source of the traffic source. Could be the name of the search engine, the referring hostname, or a value of the utm_source URL parameter. |430| socialEngagementType | STRING | Engagement type, either ""Socially Engaged"" or ""Not Socially Engaged"". |431| channelGrouping | STRING | The Default Channel Group associated with an end user's session for this View. |432| device | RECORD | This section contains information about the user devices. |433| device.browser | STRING | The browser used (e.g., ""Chrome"" or ""Firefox""). |434| device.browserSize | STRING | The viewport size of users' browsers. This captures the initial dimensions of the viewport in pixels and is formatted as width x height, for example, 1920x960. |435| device.browserVersion | STRING | The version of the browser used. |436| device.deviceCategory | STRING | The type of device (Mobile, Tablet, Desktop). |437| device.mobileDeviceInfo | STRING | The branding, model, and marketing name used to identify the mobile device. |438| device.mobileDeviceMarketingName | STRING | The marketing name used for the mobile device. |439| device.mobileDeviceModel | STRING | The mobile device model. |440| device.mobileInputSelector | STRING | Selector (e.g., touchscreen, joystick, clickwheel, stylus) used on the mobile device. |441| device.operatingSystem | STRING | The operating system of the device (e.g., ""Macintosh"" or ""Windows""). |442| device.operatingSystemVersion | STRING | The version of the operating system. |443| device.isMobile<br><br>      This field is deprecated. Use device.deviceCategory instead. | BOOLEAN | If the user is on a mobile device, this value is true, otherwise false. |444| device.mobileDeviceBranding | STRING | The brand or manufacturer of the device. |445| device.flashVersion | STRING | The version of the Adobe Flash plugin that is installed on the browser. |446| device.javaEnabled | BOOLEAN | Whether or not Java is enabled in the browser. |447| device.language | STRING | The language the device is set to use. Expressed as the IETF language code. |448| device.screenColors | STRING | Number of colors supported by the display, expressed as the bit-depth (e.g., ""8-bit"", ""24-bit"", etc.). |449| device.screenResolution | STRING | The resolution of the device's screen, expressed in pixel width x height (e.g., ""800x600""). |450| customDimensions | RECORD | This section contains any user-level or session-level custom dimensions that are set for a session. This is a repeated field and has an entry for each dimension that is set. |451| customDimensions.index | INTEGER | The index of the custom dimension. |452| customDimensions.value | STRING | The value of the custom dimension. |453| geoNetwork | RECORD | This section contains information about the geography of the user. |454| geoNetwork.continent | STRING | The continent from which sessions originated, based on IP address. |455| geoNetwork.subContinent | STRING | The sub-continent from which sessions originated, based on IP address of the visitor. |456| geoNetwork.country | STRING | The country from which sessions originated, based on IP address. |457| geoNetwork.region | STRING | The region from which sessions originate, derived from IP addresses. In the U.S., a region is a state, such as New York. |458| geoNetwork.metro | STRING | The Designated Market Area (DMA) from which sessions originate. |459| geoNetwork.city | STRING | Users' city, derived from their IP addresses or Geographical IDs. |460| geoNetwork.cityId | STRING | Users' city ID, derived from their IP addresses or Geographical IDs. |461| geoNetwork.latitude | STRING | The approximate latitude of users' city, derived from their IP addresses or Geographical IDs. Locations north of the equator have positive latitudes and locations south of the equator have negative latitudes. |462| geoNetwork.longitude | STRING | The approximate longitude of users' city, derived from their IP addresses or Geographical IDs. Locations east of the prime meridian have positive longitudes and locations west of the prime meridian have negative longitudes. |463| geoNetwork.networkDomain | STRING | [No longer supported]<br>The domain name of user's ISP, derived from the domain name registered to the ISP's IP address. |464| geoNetwork.networkLocation | STRING | [No longer supported]<br>The names of the service providers used to reach the property. For example, if most users of the website come via the major cable internet service providers, its value will be these service providers' names. |465| hits | RECORD | This row and nested fields are populated for any and all types of hits. |466| hits.dataSource | STRING | The data source of a hit. By default, hits sent from analytics.js are reported as ""web"" and hits sent from the mobile SDKs are reported as ""app"". |467| hits.sourcePropertyInfo | RECORD | This section contains information about source property for rollup properties |468| hits.sourcePropertyInfo.<br>      sourcePropertyDisplayName | STRING | Source property display name of Roll-Up Properties. This is valid for only Roll-Up Properties. |469| hits.sourcePropertyInfo.<br>      sourcePropertyTrackingId | STRING | Source property tracking ID of roll-up properties. This is valid for only roll-up properties. |470| hits.eCommerceAction | RECORD | This section contains all of the ecommerce hits that occurred during the session. This is a repeated field and has an entry for each hit that was collected. |471| hits.eCommerceAction.action_type | STRING | The action type. Click through of product lists = 1, Product detail views = 2, Add product(s) to cart = 3, Remove product(s) from cart = 4, Check out = 5, Completed purchase = 6, Refund of purchase = 7, Checkout options = 8, Unknown = 0.<br>Usually this action type applies to all the products in a hit, with the following exception: when hits.product.isImpression = TRUE, the corresponding product is a product impression that is seen while the product action is taking place (i.e., a ""product in list view""). |472| hits.eCommerceAction.option | STRING | This field is populated when a checkout option is specified. For example, a shipping option such as option = 'Fedex'. |473| hits.eCommerceAction.step | INTEGER | This field is populated when a checkout step is specified with the hit. |474| hits.exceptionInfo.exceptions | INTEGER | The number of exceptions sent to Google Analytics. |475| hits.exceptionInfo.fatalExceptions | INTEGER | The number of exceptions sent to Google Analytics where isFatal is set to true. |476| hits.experiment | RECORD | This row and the nested fields are populated for each hit that contains data for an experiment. |477| hits.experiment.experimentId | STRING | The ID of the experiment. |478| hits.experiment.experimentVariant | STRING | The variation or combination of variations present in a hit for an experiment. |479| hits.hitNumber | INTEGER | The sequenced hit number. For the first hit of each session, this is set to 1. |480| hits.hour | INTEGER | The hour in which the hit occurred (0 to 23). |481| hits.isSecure | BOOLEAN | This field is deprecated. |482| hits.isEntrance | BOOLEAN | If this hit was the first pageview or screenview hit of a session, this is set to true. |483| hits.isExit | BOOLEAN | If this hit was the last pageview or screenview hit of a session, this is set to true.<br>There is no comparable field for a Google Analytics 4 property. |484| hits.isInteraction | BOOLEAN | If this hit was an interaction, this is set to true. If this was a non-interaction hit (i.e., an event with interaction set to false), this is false. |485| hits.latencyTracking | RECORD | This section contains information about events in the Navigation Timing API. |486| hits.latencyTracking.domainLookupTime | INTEGER | The total time (in milliseconds) all samples spent in DNS lookup for this page. |487| hits.latencyTracking.domContentLoadedTime | INTEGER | The time (in milliseconds), including the network time from users' locations to the site's server, the browser takes to parse the document and execute deferred and parser-inserted scripts (DOMContentLoaded). |488| hits.latencyTracking.domInteractiveTime | INTEGER | The time (in milliseconds), including the network time from users' locations to the site's server, the browser takes to parse the document (DOMInteractive). |489| hits.latencyTracking.domLatencyMetricsSample | INTEGER | Sample set (or count) of pageviews used to calculate the averages for site speed DOM metrics. |490| hits.latencyTracking.pageDownloadTime | INTEGER | The total time (in milliseconds) to download this page among all samples. |491| hits.latencyTracking.pageLoadSample | INTEGER | The sample set (or count) of pageviews used to calculate the average page load time. |492| hits.latencyTracking.pageLoadTime | INTEGER | Total time (in milliseconds), from pageview initiation (e.g., a click on a page link) to page load completion in the browser, the pages in the sample set take to load. |493| hits.latencyTracking.redirectionTime | INTEGER | The total time (in milliseconds) all samples spent in redirects before fetching this page. If there are no redirects, this is 0. |494| hits.latencyTracking.serverConnectionTime | INTEGER | Total time (in milliseconds) all samples spent in establishing a TCP connection to this page. |495| hits.latencyTracking.serverResponseTime | INTEGER | The total time (in milliseconds) the site's server takes to respond to users' requests among all samples; this includes the network time from users' locations to the server. |496| hits.latencyTracking.speedMetricsSample | INTEGER | The sample set (or count) of pageviews used to calculate the averages of site speed metrics. |497| hits.latencyTracking.userTimingCategory | STRING | For easier reporting purposes, this is used to categorize all user timing variables into logical groups. |498| hits.latencyTracking.userTimingLabel | STRING | The name of the resource's action being tracked. |499| hits.latencyTracking.userTimingSample | INTEGER | The number of hits sent for a particular userTimingCategory, userTimingLabel, or userTimingVariable. |500| hits.latencyTracking.userTimingValue | INTEGER | Total number of milliseconds for user timing. |501| hits.latencyTracking.userTimingVariable | STRING | Variable used to add flexibility to visualize user timings in the reports. |502| hits.minute | INTEGER | The minute in which the hit occurred (0 to 59). |503| hits.product.isImpression | BOOLEAN | TRUE if at least one user viewed this product (i.e., at least one impression) when it appeared in the product list. |504| hits.product.isClick | BOOLEAN | Whether users clicked this product when it appeared in the product list. |505| hits.product.customDimensions | RECORD | This section is populated for all hits containing product scope Custom Dimensions. |506| hits.product.customDimensions.index | INTEGER | The product scope Custom Dimensions index. |507| hits.product.customDimensions.value | STRING | The product scope Custom Dimensions value. |508| hits.product.customMetrics | RECORD | This section is populated for all hits containing product scope Custom Metrics. |509| hits.product.customMetrics.index | INTEGER | The product scope Custom Metrics index. |510| hits.product.customMetrics.value | INTEGER | The product scope Custom Metrics value. |511| hits.product.productListName | STRING | Name of the list in which the product is shown, or in which a click occurred. For example, ""Home Page Promotion"", ""Also Viewed"", ""Recommended For You"", ""Search Results List"", etc. |512| hits.product.productListPosition | INTEGER | Position of the product in the list in which it is shown. |513| hits.publisher.<br>      adsenseBackfillDfpClicks | INTEGER | The number of clicks on AdSense ads that served as Google Ad Manager backfill. |514| hits.publisher.<br>      adsenseBackfillDfpImpressions | INTEGER | The number of AdSense ad impressions that were served as Google Ad Manager backfill. |515| hits.publisher.<br>      adsenseBackfillDfpMatchedQueries | INTEGER | The number of ad requests where AdSense was trafficked as backfill and returned an ad creative to the page. |516| hits.publisher.<br>      adsenseBackfillDfpMeasurableImpressions | INTEGER | The number of ad impressions filled by AdSense that viewability measurements were able to take into account (includes both in-view and not-in-view ads). |517| hits.publisheradsenseBackfillDfpPagesViewed | INTEGER | The number of Google Analytics pageviews where Google Ad Manager recorded AdSense revenue. |518| hits.publisher.adsenseBackfillDfpQueries | INTEGER | The number of ad requests made to AdSense by Google Ad Manager. |519| hits.publisher.<br>      adsenseBackfillDfpRevenueCpc | INTEGER | The CPC revenue associated with the resultant AdSense ad clicks. |520| hits.publisher.<br>      adsenseBackfillDfpRevenueCpm | INTEGER | The CPM revenue associated with the served AdSense ad impressions. |521| hits.publisher.<br>      adsenseBackfillDfpViewableImpressions | INTEGER | The number of AdSense impressions that met Google Ad Manager’s viewability standard. |522| hits.publisher.adxBackfillDfpClicks | INTEGER | The number of clicks on Google Ad Manager ads served as Google Ad Manager backfill. |523| hits.publisher.<br>      adxBackfillDfpImpressions | INTEGER | The number of Google Ad Manager ad impressions that were served as Google Ad Manager backfill. |524| hits.publisher.<br>      adxBackfillDfpMatchedQueries | INTEGER | The number of ad requests where Google Ad Manager was trafficked as backfill and returned an ad creative to the page. |525| hits.publisher.<br>      adxBackfillDfpMeasurableImpressions | INTEGER | The number of ad impressions filled by Google Ad Manager that viewability measurements are able to take into account (includes both in-view and not-in-view ads). |526| hits.publisher.<br>      adxBackfillDfpPagesViewed | INTEGER | The number of Google Analytics pageviews where Google Ad Manager recorded revenue. |527| hits.publisher.<br>      adxBackfillDfpQueries | INTEGER | The number of ad requests made to Google Ad Manager by Google Ad Manager. |528| hits.publisher.<br>      adxBackfillDfpRevenueCpc | INTEGER | The CPC revenue associated with the resultant Google Ad Manager ad clicks. |529| hits.publisher.<br>      adxBackfillDfpRevenueCpm | INTEGER | The CPM revenue associated with the served Google Ad Manager ad impressions. |530| hits.publisher.<br>      adxBackfillDfpViewableImpressions | INTEGER | The number of Google Ad Manager impressions that met Google Ad Manager’s viewability standard. |531| hits.publisher.dfpAdGroup | STRING | The Google Ad Manager Line Item ID of the ad that served. |532| hits.publisher.dfpAdUnits | STRING | The IDs of the Google Ad Manager Ad Units present in the ad request. |533| hits.publisher.dfpClicks | INTEGER | The number of times Google Ad Manager ads were clicked. |534| hits.publisher.dfpImpressions | INTEGER | A Google Ad Manager ad impression is reported whenever an individual ad is displayed. For example, when a page with two ad units is viewed once, we display two impressions. |535| hits.publisher.dfpMatchedQueries | INTEGER | The number of ad requests where a creative was returned to the page. |536| hits.publisher.dfpMeasurableImpressions | INTEGER | The number of ad impressions that viewability measurements are able to take into account (includes both in-view and not-in-view ads). |537| hits.publisher.dfpNetworkId | STRING | The Google Ad Manager network ID that the ad request was sent to. |538| hits.publisher.dfpPagesViewed | INTEGER | The number of Google Analytics pageviews where Google Ad Manager recorded revenue. |539| hits.publisher.dfpQueries | INTEGER | The number of ad requests made to Google Ad Manager. |540| hits.publisher.dfpRevenueCpc | INTEGER | The CPC revenue associated with the resultant ad clicks, based on the rate-field value for each clicked ad in Google Ad Manager. |541| hits.publisher.dfpRevenueCpm | INTEGER | The CPM revenue associated with the served ad impressions, based on the rate-field value for each served ad in Google Ad Manager. |542| hits.publisher.dfpViewableImpressions | INTEGER | The number of impressions that met Google Ad Manager’s viewability standard. |543| hits.time | INTEGER | The number of milliseconds after the visitStartTime when this hit was registered. The first hit has a hits.time of 0 |544| hits.transaction.transactionCoupon | STRING | The coupon code associated with the transaction. |545| hits.referrer | STRING | The referring page, if the session has a goal completion or transaction. If this page is from the same domain, this is blank. |546| hits.refund | RECORD | This row and nested fields are populated for each hit that contains Enhanced Ecommerce REFUND information. |547| hits.refund.localRefundAmount | INTEGER | Refund amount in local currency, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |548| hits.refund.refundAmount | INTEGER | Refund amount, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |549| hits.social | RECORD | This section is populated for each hit with type = ""SOCIAL"". |550| hits.social.hasSocialSourceReferral | STRING | A string, either Yes or No, that indicates whether sessions to the property are from a social source. |551| hits.social.socialInteractionAction | STRING | The social action passed with the social tracking code (Share, Tweet, etc.). |552| hits.social.socialInteractionNetwork | STRING | The the network passed with the social tracking code, e.g., Twitter. |553| hits.social.socialInteractionNetworkAction | STRING | For social interactions, this represents the social network being tracked. |554| hits.social.socialInteractions | INTEGER | The total number of social interactions. |555| hits.social.socialInteractionTarget | STRING | For social interactions, this is the URL (or resource) which receives the social network action. |556| hits.social.socialNetwork | STRING | The social network name. This is related to the referring social network for traffic sources; e.g., Blogger. |557| hits.social.uniqueSocialInteractions | INTEGER | The number of sessions during which the specified social action(s) occurred at least once. This is based on the the unique combination of socialInteractionNetwork, socialInteractionAction, and socialInteractionTarget. |558| hits.type | STRING | The type of hit. One of: ""PAGE"", ""TRANSACTION"", ""ITEM"", ""EVENT"", ""SOCIAL"", ""APPVIEW"", ""EXCEPTION"".<br>Timing hits are considered an event type in the Analytics backend. When you query time-related fields (e.g., hits.latencyTracking.pageLoadTime), choose hits.type as Event if you want to use hit.type in your queries. |559| hits.page | RECORD | This section is populated for each hit with type = ""PAGE"". |560| hits.page.pagePath | STRING | The URL path of the page. |561| hits.page.pagePathLevel1 | STRING | This dimension rolls up all the page paths in the 1st hierarchical level in pagePath. |562| hits.page.pagePathLevel2 | STRING | This dimension rolls up all the page paths in the 2nd hierarchical level in pagePath. |563| hits.page.pagePathLevel3 | STRING | This dimension rolls up all the page paths in the 3d hierarchical level in pagePath. |564| hits.page.pagePathLevel4 | STRING | This dimension rolls up all the page paths into hierarchical levels. Up to 4 pagePath levels may be specified. All additional levels in the pagePath hierarchy are also rolled up in this dimension. |565| hits.page.hostname | STRING | The hostname of the URL. |566| hits.page.pageTitle | STRING | The page title. |567| hits.page.searchKeyword | STRING | If this was a search results page, this is the keyword entered. |568| hits.product | RECORD | This row and nested fields will be populated for each hit that contains Enhanced Ecommerce PRODUCT data. |569| hits.product.localProductPrice | INTEGER | The price of the product in local currency, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |570| hits.product.localProductRefundAmount | INTEGER | The amount processed as part of a refund for a product in local currency, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |571| hits.product.localProductRevenue | INTEGER | The revenue of the product in local currency, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |572| hits.product.productBrand | STRING | The brand associated with the product. |573| hits.product.productPrice | INTEGER | The price of the product, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |574| hits.product.productQuantity | INTEGER | The quantity of the product purchased. |575| hits.product.productRefundAmount | INTEGER | The amount processed as part of a refund for a product, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |576| hits.product.productRevenue | INTEGER | The revenue of the product, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |577| hits.product.productSKU | STRING | Product SKU. |578| hits.product.productVariant | STRING | Product Variant. |579| hits.product.v2ProductCategory | STRING | Product Category. |580| hits.product.v2ProductName | STRING | Product Name. |581| hits.promotion | RECORD | This row and nested fields are populated for each hit that contains Enhanced Ecommerce PROMOTION information. |582| hits.promotion.promoCreative | STRING | The text or creative variation associated with the promotion. |583| hits.promotion.promoId | STRING | Promotion ID. |584| hits.promotion.promoName | STRING | Promotion Name. |585| hits.promotion.promoPosition | STRING | Promotion position on site. |586| hits.promotionActionInfo | RECORD | This row and nested fields are populated for each hit that contains Enhanced Ecommerce PROMOTION action information. |587| hits.promotionActionInfo.promoIsView | BOOLEAN | True if the Enhanced Ecommerce action is a promo view. |588| hits.promotionActionInfo.promoIsClick | BOOLEAN | True if the Enhanced Ecommerce action is a promo click. |589| hits.page.searchCategory | STRING | If this was a search-results page, this is the category selected. |590| hits.transaction | RECORD | This section is populated for each hit with type = ""TRANSACTION"". |591| hits.transaction.transactionId | STRING | The transaction ID of the ecommerce transaction. |592| hits.transaction.transactionRevenue | INTEGER | Total transaction revenue, expressed as the value passed to Analytics multiplied by 10^6. (e.g., 2.40 would be given as 2400000). |593| hits.transaction.transactionTax | INTEGER | Total transaction tax, expressed as the value passed to Analytics multiplied by 10^6. (e.g., 2.40 would be given as 2400000). |594| hits.transaction.transactionShipping | INTEGER | Total transaction shipping cost, expressed as the value passed to Analytics multiplied by 10^6. (e.g., 2.40 would be given as 2400000). |595| hits.transaction.affiliation | STRING | The affiliate information passed to the ecommerce tracking code. |596| hits.transaction.currencyCode | STRING | The local currency code for the transaction. |597| hits.transaction.localTransactionRevenue | INTEGER | Total transaction revenue in local currency, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |598| hits.transaction.localTransactionTax | INTEGER | Total transaction tax in local currency, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |599| hits.transaction.localTransactionShipping | INTEGER | Total transaction shipping cost in local currency, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |600| hits.item | RECORD | This section will be populated for each hit with type = ""ITEM"". |601| hits.item.transactionId | STRING | The transaction ID of the ecommerce transaction. |602| hits.item.productName | STRING | The name of the product. |603| hits.item.productCategory | STRING | The category of the product. |604| hits.item.productSku | STRING | The SKU or product ID. |605| hits.item.itemQuantity | INTEGER | The quantity of the product sold. |606| hits.item.itemRevenue | INTEGER | Total revenue from the item, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |607| hits.item.currencyCode | STRING | The local currency code for the transaction. |608| hits.item.localItemRevenue | INTEGER | Total revenue from this item in local currency, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |609| hits.contentGroup | RECORD | This section contains information about content grouping. Learn more |610| hits.contentGroup.contentGroupX | STRING | The content group on a property. A content group is a collection of content that provides a logical structure that can be determined by tracking-code or page-title/URL regex match, or predefined rules. (Index X can range from 1 to 5.) |611| hits.contentGroup.previousContentGroupX | STRING | Content group that was visited before another content group. (Index X can range from 1 to 5.) |612| hits.contentGroup.contentGroupUniqueViewsX | STRING | The number of unique content group views. Content group views in different sessions are counted as unique content group views. Both the pagePath and pageTitle are used to determine content group view uniqueness. (Index X can range from 1 to 5.) |613| hits.contentInfo | RECORD | This section will be populated for each hit with type = ""APPVIEW"". |614| hits.contentInfo.contentDescription | STRING | The description of the content being viewed as passed to the SDK. |615| hits.appInfo | RECORD | This section will be populated for each hit with type = ""APPVIEW"" or ""EXCEPTION"". |616| hits.appInfo.appInstallerId | STRING | ID of the installer (e.g., Google Play Store) from which the app was downloaded. |617| hits.appInfo.appName | STRING | The name of the application. |618| hits.appInfo.appVersion | STRING | The version of the application. |619| hits.appInfo.appId | STRING | The ID of the application. |620| hits.appInfo.screenName | STRING | The name of the screen. |621| hits.appInfo.landingScreenName | STRING | The landing screen of the session. |622| hits.appInfo.exitScreenName | STRING | The exit screen of the session. |623| hits.appInfo.screenDepth | STRING | The number of screenviews per session reported as a string. Can be useful for historgrams. |624| hits.exceptionInfo | RECORD | This section is populated for each hit with type = ""EXCEPTION"". |625| hits.exceptionInfo.description | STRING | The exception description. |626| hits.exceptionInfo.isFatal | BOOLEAN | If the exception was fatal, this is set to true. |627| hits.eventInfo | RECORD | This section is populated for each hit with type = ""EVENT"". |628| hits.eventInfo.eventCategory | STRING | The event category. |629| hits.eventInfo.eventAction | STRING | The event action. |630| hits.eventInfo.eventLabel | STRING | The event label. |631| hits.eventInfo.eventValue | INTEGER | The event value. |632| hits.customVariables | RECORD | This section contains any hit-level custom variables. This is a repeated field and has an entry for each variable that is set. |633| hits.customVariables.index | INTEGER | The index of the custom variable. |634| hits.customVariables.customVarName | STRING | The custom variable name. |635| hits.customVariables.customVarValue | STRING | The custom variable value. |636| hits.customDimensions | RECORD | This section contains any hit-level custom dimensions. This is a repeated field and has an entry for each dimension that is set. |637| hits.customDimensions.index | INTEGER | The index of the custom dimension. |638| hits.customDimensions.value | STRING | The value of the custom dimension. |639| hits.customMetrics | RECORD | This section contains any hit-level custom metrics. This is a repeated field and has an entry for each metric that is set. |640| hits.customMetrics.index | INTEGER | The index of the custom metric. |641| hits.customMetrics.value | INTEGER | The value of the custom metric. |642| privacy_info.ads_storage | STRING | Whether ad targeting is enabled for a user.<br>Possible values: TRUE, FALSE, UNKNOWN |643| privacy_info.analytics_storage | STRING | Whether Analytics storage is enabled for the user.<br>Possible values: TRUE, FALSE, UNKNOWN |644| privacy_info.uses_transient_token | STRING | Whether a web user has denied Analytics storage and the developer has enabled measurement without cookies based on transient tokens in server data.<br>Possible values: TRUE, FALSE, UNKNOWN |",snowflake6452,bq009,ga360,"Which traffic source has the highest total transaction revenue for the year 2017, and what is the difference in millions (rounded to two decimal places) between the highest and lowest monthly total transaction revenue for that traffic source?","WITH MONTHLY_REVENUE AS (646    SELECT 647        FORMAT_DATE(""%Y%m"", PARSE_DATE(""%Y%m%d"", date)) AS month,648        trafficSource.source AS source,649        ROUND(SUM(totals.totalTransactionRevenue) / 1000000, 2) AS revenue650    FROM `bigquery-public-data.google_analytics_sample.ga_sessions_2017*`651    GROUP BY 1, 2652),653 654YEARLY_REVENUE AS (655    SELECT656        source,657        SUM(revenue) AS total_revenue658    FROM MONTHLY_REVENUE659    GROUP BY source660),661 662TOP_SOURCE AS (663    SELECT 664        source665    FROM YEARLY_REVENUE666    ORDER BY total_revenue DESC667    LIMIT 1668),669 670SOURCE_MONTHLY_REVENUE AS (671    SELECT672        month,673        source,674        revenue675    FROM MONTHLY_REVENUE676    WHERE source IN (SELECT source FROM TOP_SOURCE)677),678 679REVENUE_DIFF AS (680    SELECT 681        source,682        ROUND(MAX(revenue), 2) AS max_revenue,683        ROUND(MIN(revenue), 2) AS min_revenue,684        ROUND(MAX(revenue) - MIN(revenue), 2) AS diff_revenue685    FROM SOURCE_MONTHLY_REVENUE686    GROUP BY source687)688 689SELECT 690    source,691    diff_revenue692FROM REVENUE_DIFF;693","## Documents about Google Analytics Sample - ga_sessions694 695This article explains the format and schema of the data that is imported into BigQuery.696 697## Datasets698 699For each Analytics view that is enabled for BigQuery integration, a dataset is added using the view ID as the name.700 701## Tables702 703Within each dataset, a table is imported for each day of export. Daily tables have the format ""ga\_sessions\_YYYYMMDD"".704 705Intraday data is imported at least three times a day. Intraday tables have the format ""ga\_sessions\_intraday\_YYYYMMDD"". During the same day, each import of intraday data overwrites the previous import in the same table.706 707When the daily import is complete, the intraday table from the previous day is deleted. For the current day, until the first intraday import, there is no intraday table. If an intraday-table write fails, then the previous day's intraday table is preserved.708 709Data for the current day is not final until the daily import is complete. You may notice differences between intraday and daily data based on active user sessions that cross the time boundary of last intraday import.710 711## Rows712 713Each row within a table corresponds to a session in Analytics 360.714 715## Columns716 717The columns within the export are listed below. In BigQuery, some columns may have nested fields and messages within them.718 719| Field Name | Data Type | Description |720| --- | --- | --- |721| clientId | STRING | Unhashed version of the Client ID for a given user associated with any given visit/session. |722| fullVisitorId | STRING | The unique visitor ID. |723| visitorId | NULL | This field is deprecated. Use ""fullVisitorId"" instead. |724| userId | STRING | Overridden User ID sent to Analytics. |725| visitNumber | INTEGER | The session number for this user. If this is the first session, then this is set to 1. |726| visitId | INTEGER | An identifier for this session. This is part of the value usually stored as the _utmb cookie. This is only unique to the user. For a completely unique ID, you should use a combination of fullVisitorId and visitId. |727| visitStartTime | INTEGER | The timestamp (expressed as POSIX time). |728| date | STRING | The date of the session in YYYYMMDD format. |729| totals | RECORD | This section contains aggregate values across the session. |730| totals.bounces | INTEGER | Total bounces (for convenience). For a bounced session, the value is 1, otherwise it is null. |731| totals.hits | INTEGER | Total number of hits within the session. |732| totals.newVisits | INTEGER | Total number of new users in session (for convenience). If this is the first visit, this value is 1, otherwise it is null. |733| totals.pageviews | INTEGER | Total number of pageviews within the session. |734| totals.screenviews | INTEGER | Total number of screenviews within the session. |735| totals.sessionQualityDim | INTEGER | An estimate of how close a particular session was to transacting, ranging from 1 to 100, calculated for each session. A value closer to 1 indicates a low session quality, or far from transacting, while a value closer to 100 indicates a high session quality, or very close to transacting. A value of 0 indicates that Session Quality is not calculated for the selected time range. |736| totals.timeOnScreen | INTEGER | The total time on screen in seconds. |737| totals.timeOnSite | INTEGER | Total time of the session expressed in seconds. |738| totals.totalTransactionRevenue | INTEGER | Total transaction revenue, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |739| totals.transactionRevenue | INTEGER | This field is deprecated. Use ""totals.totalTransactionRevenue"" instead (see above). |740| totals.transactions | INTEGER | Total number of ecommerce transactions within the session. |741| totals.UniqueScreenViews | INTEGER | Total number of unique screenviews within the session. |742| totals.visits | INTEGER | The number of sessions (for convenience). This value is 1 for sessions with interaction events. The value is null if there are no interaction events in the session. |743| trafficSource | RECORD | This section contains information about the Traffic Source from which the session originated. |744| trafficSource.adContent | STRING | The ad content of the traffic source. Can be set by the utm_content URL parameter. |745| trafficSource.adwordsClickInfo | RECORD | This section contains information about the Google Ads click info if there is any associated with this session. Analytics uses the last non-direct click model. |746| trafficSource.<br>      adwordsClickInfo.adGroupId | INTEGER | The Google ad-group ID. |747| trafficSource.<br>      adwordsClickInfo.adNetworkType | STRING | Network Type. Takes one of the following values: {“Google Search"", ""Content"", ""Search partners"", ""Ad Exchange"", ""Yahoo Japan Search"", ""Yahoo Japan AFS"", “unknown”} |748| trafficSource.<br>      adwordsClickInfo.campaignId | INTEGER | The Google Ads campaign ID. |749| trafficSource.<br>      adwordsClickInfo.creativeId | INTEGER | The Google ad ID. |750| trafficSource.<br>      adwordsClickInfo.criteriaId | INTEGER | The ID for the targeting criterion. |751| trafficSource.<br>      adwordsClickInfo.criteriaParameters | STRING | Descriptive string for the targeting criterion. |752| trafficSource.<br>      adwordsClickInfo.customerId | INTEGER | The Google Ads Customer ID. |753| trafficSource.<br>      adwordsClickInfo.gclId | STRING | The Google Click ID. |754| trafficSource.<br>      adwordsClickInfo.isVideoAd | BOOLEAN | True if it is a Trueview video ad. |755| trafficSource.<br>      adwordsClickInfo.page | INTEGER | Page number in search results where the ad was shown. |756| trafficSource.<br>      adwordsClickInfo.slot | STRING | Position of the Ad. Takes one of the following values:{“RHS"", ""Top""} |757| trafficSource.<br>      adwordsClickInfo.targetingCriteria | RECORD | Google Ads targeting criteria for a click. There are multiple types of targeting criteria, but should have only one value for each criterion. |758| trafficSource.<br>      adwordsClickInfo.targetingCriteria.<br>      boomUserlistId | INTEGER | Remarketing list ID (if any) in Google Ads, derived from matching_criteria in click record. |759| trafficSource.campaign | STRING | The campaign value. Usually set by the utm_campaign URL parameter. |760| trafficSource.campaignCode | STRING | Value of the utm_id campaign tracking parameter, used for manual campaign tracking. |761| trafficSource.isTrueDirect | BOOLEAN | True if the source of the session was Direct (meaning the user typed the name of your website URL into the browser or came to your site via a bookmark), This field will also be true if 2 successive but distinct sessions have exactly the same campaign details. Otherwise NULL. |762| trafficSource.keyword | STRING | The keyword of the traffic source, usually set when the trafficSource.medium is ""organic"" or ""cpc"". Can be set by the utm_term URL parameter. |763| trafficSource.medium | STRING | The medium of the traffic source. Could be ""organic"", ""cpc"", ""referral"", or the value of the utm_medium URL parameter. |764| trafficSource.referralPath | STRING | If trafficSource.medium is ""referral"", then this is set to the path of the referrer. (The host name of the referrer is in trafficSource.source.) |765| trafficSource.source | STRING | The source of the traffic source. Could be the name of the search engine, the referring hostname, or a value of the utm_source URL parameter. |766| socialEngagementType | STRING | Engagement type, either ""Socially Engaged"" or ""Not Socially Engaged"". |767| channelGrouping | STRING | The Default Channel Group associated with an end user's session for this View. |768| device | RECORD | This section contains information about the user devices. |769| device.browser | STRING | The browser used (e.g., ""Chrome"" or ""Firefox""). |770| device.browserSize | STRING | The viewport size of users' browsers. This captures the initial dimensions of the viewport in pixels and is formatted as width x height, for example, 1920x960. |771| device.browserVersion | STRING | The version of the browser used. |772| device.deviceCategory | STRING | The type of device (Mobile, Tablet, Desktop). |773| device.mobileDeviceInfo | STRING | The branding, model, and marketing name used to identify the mobile device. |774| device.mobileDeviceMarketingName | STRING | The marketing name used for the mobile device. |775| device.mobileDeviceModel | STRING | The mobile device model. |776| device.mobileInputSelector | STRING | Selector (e.g., touchscreen, joystick, clickwheel, stylus) used on the mobile device. |777| device.operatingSystem | STRING | The operating system of the device (e.g., ""Macintosh"" or ""Windows""). |778| device.operatingSystemVersion | STRING | The version of the operating system. |779| device.isMobile<br><br>      This field is deprecated. Use device.deviceCategory instead. | BOOLEAN | If the user is on a mobile device, this value is true, otherwise false. |780| device.mobileDeviceBranding | STRING | The brand or manufacturer of the device. |781| device.flashVersion | STRING | The version of the Adobe Flash plugin that is installed on the browser. |782| device.javaEnabled | BOOLEAN | Whether or not Java is enabled in the browser. |783| device.language | STRING | The language the device is set to use. Expressed as the IETF language code. |784| device.screenColors | STRING | Number of colors supported by the display, expressed as the bit-depth (e.g., ""8-bit"", ""24-bit"", etc.). |785| device.screenResolution | STRING | The resolution of the device's screen, expressed in pixel width x height (e.g., ""800x600""). |786| customDimensions | RECORD | This section contains any user-level or session-level custom dimensions that are set for a session. This is a repeated field and has an entry for each dimension that is set. |787| customDimensions.index | INTEGER | The index of the custom dimension. |788| customDimensions.value | STRING | The value of the custom dimension. |789| geoNetwork | RECORD | This section contains information about the geography of the user. |790| geoNetwork.continent | STRING | The continent from which sessions originated, based on IP address. |791| geoNetwork.subContinent | STRING | The sub-continent from which sessions originated, based on IP address of the visitor. |792| geoNetwork.country | STRING | The country from which sessions originated, based on IP address. |793| geoNetwork.region | STRING | The region from which sessions originate, derived from IP addresses. In the U.S., a region is a state, such as New York. |794| geoNetwork.metro | STRING | The Designated Market Area (DMA) from which sessions originate. |795| geoNetwork.city | STRING | Users' city, derived from their IP addresses or Geographical IDs. |796| geoNetwork.cityId | STRING | Users' city ID, derived from their IP addresses or Geographical IDs. |797| geoNetwork.latitude | STRING | The approximate latitude of users' city, derived from their IP addresses or Geographical IDs. Locations north of the equator have positive latitudes and locations south of the equator have negative latitudes. |798| geoNetwork.longitude | STRING | The approximate longitude of users' city, derived from their IP addresses or Geographical IDs. Locations east of the prime meridian have positive longitudes and locations west of the prime meridian have negative longitudes. |799| geoNetwork.networkDomain | STRING | [No longer supported]<br>The domain name of user's ISP, derived from the domain name registered to the ISP's IP address. |800| geoNetwork.networkLocation | STRING | [No longer supported]<br>The names of the service providers used to reach the property. For example, if most users of the website come via the major cable internet service providers, its value will be these service providers' names. |801| hits | RECORD | This row and nested fields are populated for any and all types of hits. |802| hits.dataSource | STRING | The data source of a hit. By default, hits sent from analytics.js are reported as ""web"" and hits sent from the mobile SDKs are reported as ""app"". |803| hits.sourcePropertyInfo | RECORD | This section contains information about source property for rollup properties |804| hits.sourcePropertyInfo.<br>      sourcePropertyDisplayName | STRING | Source property display name of Roll-Up Properties. This is valid for only Roll-Up Properties. |805| hits.sourcePropertyInfo.<br>      sourcePropertyTrackingId | STRING | Source property tracking ID of roll-up properties. This is valid for only roll-up properties. |806| hits.eCommerceAction | RECORD | This section contains all of the ecommerce hits that occurred during the session. This is a repeated field and has an entry for each hit that was collected. |807| hits.eCommerceAction.action_type | STRING | The action type. Click through of product lists = 1, Product detail views = 2, Add product(s) to cart = 3, Remove product(s) from cart = 4, Check out = 5, Completed purchase = 6, Refund of purchase = 7, Checkout options = 8, Unknown = 0.<br>Usually this action type applies to all the products in a hit, with the following exception: when hits.product.isImpression = TRUE, the corresponding product is a product impression that is seen while the product action is taking place (i.e., a ""product in list view""). |808| hits.eCommerceAction.option | STRING | This field is populated when a checkout option is specified. For example, a shipping option such as option = 'Fedex'. |809| hits.eCommerceAction.step | INTEGER | This field is populated when a checkout step is specified with the hit. |810| hits.exceptionInfo.exceptions | INTEGER | The number of exceptions sent to Google Analytics. |811| hits.exceptionInfo.fatalExceptions | INTEGER | The number of exceptions sent to Google Analytics where isFatal is set to true. |812| hits.experiment | RECORD | This row and the nested fields are populated for each hit that contains data for an experiment. |813| hits.experiment.experimentId | STRING | The ID of the experiment. |814| hits.experiment.experimentVariant | STRING | The variation or combination of variations present in a hit for an experiment. |815| hits.hitNumber | INTEGER | The sequenced hit number. For the first hit of each session, this is set to 1. |816| hits.hour | INTEGER | The hour in which the hit occurred (0 to 23). |817| hits.isSecure | BOOLEAN | This field is deprecated. |818| hits.isEntrance | BOOLEAN | If this hit was the first pageview or screenview hit of a session, this is set to true. |819| hits.isExit | BOOLEAN | If this hit was the last pageview or screenview hit of a session, this is set to true.<br>There is no comparable field for a Google Analytics 4 property. |820| hits.isInteraction | BOOLEAN | If this hit was an interaction, this is set to true. If this was a non-interaction hit (i.e., an event with interaction set to false), this is false. |821| hits.latencyTracking | RECORD | This section contains information about events in the Navigation Timing API. |822| hits.latencyTracking.domainLookupTime | INTEGER | The total time (in milliseconds) all samples spent in DNS lookup for this page. |823| hits.latencyTracking.domContentLoadedTime | INTEGER | The time (in milliseconds), including the network time from users' locations to the site's server, the browser takes to parse the document and execute deferred and parser-inserted scripts (DOMContentLoaded). |824| hits.latencyTracking.domInteractiveTime | INTEGER | The time (in milliseconds), including the network time from users' locations to the site's server, the browser takes to parse the document (DOMInteractive). |825| hits.latencyTracking.domLatencyMetricsSample | INTEGER | Sample set (or count) of pageviews used to calculate the averages for site speed DOM metrics. |826| hits.latencyTracking.pageDownloadTime | INTEGER | The total time (in milliseconds) to download this page among all samples. |827| hits.latencyTracking.pageLoadSample | INTEGER | The sample set (or count) of pageviews used to calculate the average page load time. |828| hits.latencyTracking.pageLoadTime | INTEGER | Total time (in milliseconds), from pageview initiation (e.g., a click on a page link) to page load completion in the browser, the pages in the sample set take to load. |829| hits.latencyTracking.redirectionTime | INTEGER | The total time (in milliseconds) all samples spent in redirects before fetching this page. If there are no redirects, this is 0. |830| hits.latencyTracking.serverConnectionTime | INTEGER | Total time (in milliseconds) all samples spent in establishing a TCP connection to this page. |831| hits.latencyTracking.serverResponseTime | INTEGER | The total time (in milliseconds) the site's server takes to respond to users' requests among all samples; this includes the network time from users' locations to the server. |832| hits.latencyTracking.speedMetricsSample | INTEGER | The sample set (or count) of pageviews used to calculate the averages of site speed metrics. |833| hits.latencyTracking.userTimingCategory | STRING | For easier reporting purposes, this is used to categorize all user timing variables into logical groups. |834| hits.latencyTracking.userTimingLabel | STRING | The name of the resource's action being tracked. |835| hits.latencyTracking.userTimingSample | INTEGER | The number of hits sent for a particular userTimingCategory, userTimingLabel, or userTimingVariable. |836| hits.latencyTracking.userTimingValue | INTEGER | Total number of milliseconds for user timing. |837| hits.latencyTracking.userTimingVariable | STRING | Variable used to add flexibility to visualize user timings in the reports. |838| hits.minute | INTEGER | The minute in which the hit occurred (0 to 59). |839| hits.product.isImpression | BOOLEAN | TRUE if at least one user viewed this product (i.e., at least one impression) when it appeared in the product list. |840| hits.product.isClick | BOOLEAN | Whether users clicked this product when it appeared in the product list. |841| hits.product.customDimensions | RECORD | This section is populated for all hits containing product scope Custom Dimensions. |842| hits.product.customDimensions.index | INTEGER | The product scope Custom Dimensions index. |843| hits.product.customDimensions.value | STRING | The product scope Custom Dimensions value. |844| hits.product.customMetrics | RECORD | This section is populated for all hits containing product scope Custom Metrics. |845| hits.product.customMetrics.index | INTEGER | The product scope Custom Metrics index. |846| hits.product.customMetrics.value | INTEGER | The product scope Custom Metrics value. |847| hits.product.productListName | STRING | Name of the list in which the product is shown, or in which a click occurred. For example, ""Home Page Promotion"", ""Also Viewed"", ""Recommended For You"", ""Search Results List"", etc. |848| hits.product.productListPosition | INTEGER | Position of the product in the list in which it is shown. |849| hits.publisher.<br>      adsenseBackfillDfpClicks | INTEGER | The number of clicks on AdSense ads that served as Google Ad Manager backfill. |850| hits.publisher.<br>      adsenseBackfillDfpImpressions | INTEGER | The number of AdSense ad impressions that were served as Google Ad Manager backfill. |851| hits.publisher.<br>      adsenseBackfillDfpMatchedQueries | INTEGER | The number of ad requests where AdSense was trafficked as backfill and returned an ad creative to the page. |852| hits.publisher.<br>      adsenseBackfillDfpMeasurableImpressions | INTEGER | The number of ad impressions filled by AdSense that viewability measurements were able to take into account (includes both in-view and not-in-view ads). |853| hits.publisheradsenseBackfillDfpPagesViewed | INTEGER | The number of Google Analytics pageviews where Google Ad Manager recorded AdSense revenue. |854| hits.publisher.adsenseBackfillDfpQueries | INTEGER | The number of ad requests made to AdSense by Google Ad Manager. |855| hits.publisher.<br>      adsenseBackfillDfpRevenueCpc | INTEGER | The CPC revenue associated with the resultant AdSense ad clicks. |856| hits.publisher.<br>      adsenseBackfillDfpRevenueCpm | INTEGER | The CPM revenue associated with the served AdSense ad impressions. |857| hits.publisher.<br>      adsenseBackfillDfpViewableImpressions | INTEGER | The number of AdSense impressions that met Google Ad Manager’s viewability standard. |858| hits.publisher.adxBackfillDfpClicks | INTEGER | The number of clicks on Google Ad Manager ads served as Google Ad Manager backfill. |859| hits.publisher.<br>      adxBackfillDfpImpressions | INTEGER | The number of Google Ad Manager ad impressions that were served as Google Ad Manager backfill. |860| hits.publisher.<br>      adxBackfillDfpMatchedQueries | INTEGER | The number of ad requests where Google Ad Manager was trafficked as backfill and returned an ad creative to the page. |861| hits.publisher.<br>      adxBackfillDfpMeasurableImpressions | INTEGER | The number of ad impressions filled by Google Ad Manager that viewability measurements are able to take into account (includes both in-view and not-in-view ads). |862| hits.publisher.<br>      adxBackfillDfpPagesViewed | INTEGER | The number of Google Analytics pageviews where Google Ad Manager recorded revenue. |863| hits.publisher.<br>      adxBackfillDfpQueries | INTEGER | The number of ad requests made to Google Ad Manager by Google Ad Manager. |864| hits.publisher.<br>      adxBackfillDfpRevenueCpc | INTEGER | The CPC revenue associated with the resultant Google Ad Manager ad clicks. |865| hits.publisher.<br>      adxBackfillDfpRevenueCpm | INTEGER | The CPM revenue associated with the served Google Ad Manager ad impressions. |866| hits.publisher.<br>      adxBackfillDfpViewableImpressions | INTEGER | The number of Google Ad Manager impressions that met Google Ad Manager’s viewability standard. |867| hits.publisher.dfpAdGroup | STRING | The Google Ad Manager Line Item ID of the ad that served. |868| hits.publisher.dfpAdUnits | STRING | The IDs of the Google Ad Manager Ad Units present in the ad request. |869| hits.publisher.dfpClicks | INTEGER | The number of times Google Ad Manager ads were clicked. |870| hits.publisher.dfpImpressions | INTEGER | A Google Ad Manager ad impression is reported whenever an individual ad is displayed. For example, when a page with two ad units is viewed once, we display two impressions. |871| hits.publisher.dfpMatchedQueries | INTEGER | The number of ad requests where a creative was returned to the page. |872| hits.publisher.dfpMeasurableImpressions | INTEGER | The number of ad impressions that viewability measurements are able to take into account (includes both in-view and not-in-view ads). |873| hits.publisher.dfpNetworkId | STRING | The Google Ad Manager network ID that the ad request was sent to. |874| hits.publisher.dfpPagesViewed | INTEGER | The number of Google Analytics pageviews where Google Ad Manager recorded revenue. |875| hits.publisher.dfpQueries | INTEGER | The number of ad requests made to Google Ad Manager. |876| hits.publisher.dfpRevenueCpc | INTEGER | The CPC revenue associated with the resultant ad clicks, based on the rate-field value for each clicked ad in Google Ad Manager. |877| hits.publisher.dfpRevenueCpm | INTEGER | The CPM revenue associated with the served ad impressions, based on the rate-field value for each served ad in Google Ad Manager. |878| hits.publisher.dfpViewableImpressions | INTEGER | The number of impressions that met Google Ad Manager’s viewability standard. |879| hits.time | INTEGER | The number of milliseconds after the visitStartTime when this hit was registered. The first hit has a hits.time of 0 |880| hits.transaction.transactionCoupon | STRING | The coupon code associated with the transaction. |881| hits.referrer | STRING | The referring page, if the session has a goal completion or transaction. If this page is from the same domain, this is blank. |882| hits.refund | RECORD | This row and nested fields are populated for each hit that contains Enhanced Ecommerce REFUND information. |883| hits.refund.localRefundAmount | INTEGER | Refund amount in local currency, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |884| hits.refund.refundAmount | INTEGER | Refund amount, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |885| hits.social | RECORD | This section is populated for each hit with type = ""SOCIAL"". |886| hits.social.hasSocialSourceReferral | STRING | A string, either Yes or No, that indicates whether sessions to the property are from a social source. |887| hits.social.socialInteractionAction | STRING | The social action passed with the social tracking code (Share, Tweet, etc.). |888| hits.social.socialInteractionNetwork | STRING | The the network passed with the social tracking code, e.g., Twitter. |889| hits.social.socialInteractionNetworkAction | STRING | For social interactions, this represents the social network being tracked. |890| hits.social.socialInteractions | INTEGER | The total number of social interactions. |891| hits.social.socialInteractionTarget | STRING | For social interactions, this is the URL (or resource) which receives the social network action. |892| hits.social.socialNetwork | STRING | The social network name. This is related to the referring social network for traffic sources; e.g., Blogger. |893| hits.social.uniqueSocialInteractions | INTEGER | The number of sessions during which the specified social action(s) occurred at least once. This is based on the the unique combination of socialInteractionNetwork, socialInteractionAction, and socialInteractionTarget. |894| hits.type | STRING | The type of hit. One of: ""PAGE"", ""TRANSACTION"", ""ITEM"", ""EVENT"", ""SOCIAL"", ""APPVIEW"", ""EXCEPTION"".<br>Timing hits are considered an event type in the Analytics backend. When you query time-related fields (e.g., hits.latencyTracking.pageLoadTime), choose hits.type as Event if you want to use hit.type in your queries. |895| hits.page | RECORD | This section is populated for each hit with type = ""PAGE"". |896| hits.page.pagePath | STRING | The URL path of the page. |897| hits.page.pagePathLevel1 | STRING | This dimension rolls up all the page paths in the 1st hierarchical level in pagePath. |898| hits.page.pagePathLevel2 | STRING | This dimension rolls up all the page paths in the 2nd hierarchical level in pagePath. |899| hits.page.pagePathLevel3 | STRING | This dimension rolls up all the page paths in the 3d hierarchical level in pagePath. |900| hits.page.pagePathLevel4 | STRING | This dimension rolls up all the page paths into hierarchical levels. Up to 4 pagePath levels may be specified. All additional levels in the pagePath hierarchy are also rolled up in this dimension. |901| hits.page.hostname | STRING | The hostname of the URL. |902| hits.page.pageTitle | STRING | The page title. |903| hits.page.searchKeyword | STRING | If this was a search results page, this is the keyword entered. |904| hits.product | RECORD | This row and nested fields will be populated for each hit that contains Enhanced Ecommerce PRODUCT data. |905| hits.product.localProductPrice | INTEGER | The price of the product in local currency, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |906| hits.product.localProductRefundAmount | INTEGER | The amount processed as part of a refund for a product in local currency, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |907| hits.product.localProductRevenue | INTEGER | The revenue of the product in local currency, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |908| hits.product.productBrand | STRING | The brand associated with the product. |909| hits.product.productPrice | INTEGER | The price of the product, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |910| hits.product.productQuantity | INTEGER | The quantity of the product purchased. |911| hits.product.productRefundAmount | INTEGER | The amount processed as part of a refund for a product, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |912| hits.product.productRevenue | INTEGER | The revenue of the product, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |913| hits.product.productSKU | STRING | Product SKU. |914| hits.product.productVariant | STRING | Product Variant. |915| hits.product.v2ProductCategory | STRING | Product Category. |916| hits.product.v2ProductName | STRING | Product Name. |917| hits.promotion | RECORD | This row and nested fields are populated for each hit that contains Enhanced Ecommerce PROMOTION information. |918| hits.promotion.promoCreative | STRING | The text or creative variation associated with the promotion. |919| hits.promotion.promoId | STRING | Promotion ID. |920| hits.promotion.promoName | STRING | Promotion Name. |921| hits.promotion.promoPosition | STRING | Promotion position on site. |922| hits.promotionActionInfo | RECORD | This row and nested fields are populated for each hit that contains Enhanced Ecommerce PROMOTION action information. |923| hits.promotionActionInfo.promoIsView | BOOLEAN | True if the Enhanced Ecommerce action is a promo view. |924| hits.promotionActionInfo.promoIsClick | BOOLEAN | True if the Enhanced Ecommerce action is a promo click. |925| hits.page.searchCategory | STRING | If this was a search-results page, this is the category selected. |926| hits.transaction | RECORD | This section is populated for each hit with type = ""TRANSACTION"". |927| hits.transaction.transactionId | STRING | The transaction ID of the ecommerce transaction. |928| hits.transaction.transactionRevenue | INTEGER | Total transaction revenue, expressed as the value passed to Analytics multiplied by 10^6. (e.g., 2.40 would be given as 2400000). |929| hits.transaction.transactionTax | INTEGER | Total transaction tax, expressed as the value passed to Analytics multiplied by 10^6. (e.g., 2.40 would be given as 2400000). |930| hits.transaction.transactionShipping | INTEGER | Total transaction shipping cost, expressed as the value passed to Analytics multiplied by 10^6. (e.g., 2.40 would be given as 2400000). |931| hits.transaction.affiliation | STRING | The affiliate information passed to the ecommerce tracking code. |932| hits.transaction.currencyCode | STRING | The local currency code for the transaction. |933| hits.transaction.localTransactionRevenue | INTEGER | Total transaction revenue in local currency, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |934| hits.transaction.localTransactionTax | INTEGER | Total transaction tax in local currency, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |935| hits.transaction.localTransactionShipping | INTEGER | Total transaction shipping cost in local currency, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |936| hits.item | RECORD | This section will be populated for each hit with type = ""ITEM"". |937| hits.item.transactionId | STRING | The transaction ID of the ecommerce transaction. |938| hits.item.productName | STRING | The name of the product. |939| hits.item.productCategory | STRING | The category of the product. |940| hits.item.productSku | STRING | The SKU or product ID. |941| hits.item.itemQuantity | INTEGER | The quantity of the product sold. |942| hits.item.itemRevenue | INTEGER | Total revenue from the item, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |943| hits.item.currencyCode | STRING | The local currency code for the transaction. |944| hits.item.localItemRevenue | INTEGER | Total revenue from this item in local currency, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |945| hits.contentGroup | RECORD | This section contains information about content grouping. Learn more |946| hits.contentGroup.contentGroupX | STRING | The content group on a property. A content group is a collection of content that provides a logical structure that can be determined by tracking-code or page-title/URL regex match, or predefined rules. (Index X can range from 1 to 5.) |947| hits.contentGroup.previousContentGroupX | STRING | Content group that was visited before another content group. (Index X can range from 1 to 5.) |948| hits.contentGroup.contentGroupUniqueViewsX | STRING | The number of unique content group views. Content group views in different sessions are counted as unique content group views. Both the pagePath and pageTitle are used to determine content group view uniqueness. (Index X can range from 1 to 5.) |949| hits.contentInfo | RECORD | This section will be populated for each hit with type = ""APPVIEW"". |950| hits.contentInfo.contentDescription | STRING | The description of the content being viewed as passed to the SDK. |951| hits.appInfo | RECORD | This section will be populated for each hit with type = ""APPVIEW"" or ""EXCEPTION"". |952| hits.appInfo.appInstallerId | STRING | ID of the installer (e.g., Google Play Store) from which the app was downloaded. |953| hits.appInfo.appName | STRING | The name of the application. |954| hits.appInfo.appVersion | STRING | The version of the application. |955| hits.appInfo.appId | STRING | The ID of the application. |956| hits.appInfo.screenName | STRING | The name of the screen. |957| hits.appInfo.landingScreenName | STRING | The landing screen of the session. |958| hits.appInfo.exitScreenName | STRING | The exit screen of the session. |959| hits.appInfo.screenDepth | STRING | The number of screenviews per session reported as a string. Can be useful for historgrams. |960| hits.exceptionInfo | RECORD | This section is populated for each hit with type = ""EXCEPTION"". |961| hits.exceptionInfo.description | STRING | The exception description. |962| hits.exceptionInfo.isFatal | BOOLEAN | If the exception was fatal, this is set to true. |963| hits.eventInfo | RECORD | This section is populated for each hit with type = ""EVENT"". |964| hits.eventInfo.eventCategory | STRING | The event category. |965| hits.eventInfo.eventAction | STRING | The event action. |966| hits.eventInfo.eventLabel | STRING | The event label. |967| hits.eventInfo.eventValue | INTEGER | The event value. |968| hits.customVariables | RECORD | This section contains any hit-level custom variables. This is a repeated field and has an entry for each variable that is set. |969| hits.customVariables.index | INTEGER | The index of the custom variable. |970| hits.customVariables.customVarName | STRING | The custom variable name. |971| hits.customVariables.customVarValue | STRING | The custom variable value. |972| hits.customDimensions | RECORD | This section contains any hit-level custom dimensions. This is a repeated field and has an entry for each dimension that is set. |973| hits.customDimensions.index | INTEGER | The index of the custom dimension. |974| hits.customDimensions.value | STRING | The value of the custom dimension. |975| hits.customMetrics | RECORD | This section contains any hit-level custom metrics. This is a repeated field and has an entry for each metric that is set. |976| hits.customMetrics.index | INTEGER | The index of the custom metric. |977| hits.customMetrics.value | INTEGER | The value of the custom metric. |978| privacy_info.ads_storage | STRING | Whether ad targeting is enabled for a user.<br>Possible values: TRUE, FALSE, UNKNOWN |979| privacy_info.analytics_storage | STRING | Whether Analytics storage is enabled for the user.<br>Possible values: TRUE, FALSE, UNKNOWN |980| privacy_info.uses_transient_token | STRING | Whether a web user has denied Analytics storage and the developer has enabled measurement without cookies based on transient tokens in server data.<br>Possible values: TRUE, FALSE, UNKNOWN |",snowflake9813,bq001,ga360,"For each visitor who made at least one transaction in February 2017, how many days elapsed between the date of their first visit in February and the date of their first transaction in February, and on what type of device did they make that first transaction?","DECLARE start_date STRING DEFAULT '20170201';982DECLARE end_date STRING DEFAULT '20170228';983 984WITH visit AS (985    SELECT986        fullvisitorid,987        MIN(date) AS date_first_visit988    FROM989        `bigquery-public-data.google_analytics_sample.ga_sessions_*`990    WHERE991       _TABLE_SUFFIX BETWEEN start_date AND end_date992    GROUP BY fullvisitorid993),994 995transactions AS (996    SELECT997        fullvisitorid,998        MIN(date) AS date_transactions999    FROM1000        `bigquery-public-data.google_analytics_sample.ga_sessions_*` AS ga,1001        UNNEST(ga.hits) AS hits1002    WHERE1003        hits.transaction.transactionId IS NOT NULL1004        AND1005        _TABLE_SUFFIX BETWEEN start_date AND end_date1006    GROUP BY fullvisitorid1007),1008 1009device_transactions AS (1010    SELECT DISTINCT1011        fullvisitorid,1012        date,1013        device.deviceCategory1014    FROM1015        `bigquery-public-data.google_analytics_sample.ga_sessions_*` AS ga,1016        UNNEST(ga.hits) AS hits1017    WHERE1018        hits.transaction.transactionId IS NOT NULL1019        AND1020        _TABLE_SUFFIX BETWEEN start_date AND end_date1021),1022 1023visits_transactions AS (1024    SELECT1025        visit.fullvisitorid,1026        date_first_visit,1027        date_transactions,1028        device_transactions.deviceCategory AS device_transaction1029    FROM1030        visit1031        JOIN transactions1032        ON visit.fullvisitorid = transactions.fullvisitorid1033        JOIN device_transactions1034        ON visit.fullvisitorid = device_transactions.fullvisitorid 1035        AND transactions.date_transactions = device_transactions.date1036)1037 1038SELECT1039       fullvisitorid,1040       DATE_DIFF(PARSE_DATE('%Y%m%d', date_transactions), PARSE_DATE('%Y%m%d', date_first_visit), DAY) AS time,1041       device_transaction1042FROM visits_transactions1043ORDER BY fullvisitorid;","## Documents about Google Analytics Sample - ga_sessions1044 1045This article explains the format and schema of the data that is imported into BigQuery.1046 1047## Datasets1048 1049For each Analytics view that is enabled for BigQuery integration, a dataset is added using the view ID as the name.1050 1051## Tables1052 1053Within each dataset, a table is imported for each day of export. Daily tables have the format ""ga\_sessions\_YYYYMMDD"".1054 1055Intraday data is imported at least three times a day. Intraday tables have the format ""ga\_sessions\_intraday\_YYYYMMDD"". During the same day, each import of intraday data overwrites the previous import in the same table.1056 1057When the daily import is complete, the intraday table from the previous day is deleted. For the current day, until the first intraday import, there is no intraday table. If an intraday-table write fails, then the previous day's intraday table is preserved.1058 1059Data for the current day is not final until the daily import is complete. You may notice differences between intraday and daily data based on active user sessions that cross the time boundary of last intraday import.1060 1061## Rows1062 1063Each row within a table corresponds to a session in Analytics 360.1064 1065## Columns1066 1067The columns within the export are listed below. In BigQuery, some columns may have nested fields and messages within them.1068 1069| Field Name | Data Type | Description |1070| --- | --- | --- |1071| clientId | STRING | Unhashed version of the Client ID for a given user associated with any given visit/session. |1072| fullVisitorId | STRING | The unique visitor ID. |1073| visitorId | NULL | This field is deprecated. Use ""fullVisitorId"" instead. |1074| userId | STRING | Overridden User ID sent to Analytics. |1075| visitNumber | INTEGER | The session number for this user. If this is the first session, then this is set to 1. |1076| visitId | INTEGER | An identifier for this session. This is part of the value usually stored as the _utmb cookie. This is only unique to the user. For a completely unique ID, you should use a combination of fullVisitorId and visitId. |1077| visitStartTime | INTEGER | The timestamp (expressed as POSIX time). |1078| date | STRING | The date of the session in YYYYMMDD format. |1079| totals | RECORD | This section contains aggregate values across the session. |1080| totals.bounces | INTEGER | Total bounces (for convenience). For a bounced session, the value is 1, otherwise it is null. |1081| totals.hits | INTEGER | Total number of hits within the session. |1082| totals.newVisits | INTEGER | Total number of new users in session (for convenience). If this is the first visit, this value is 1, otherwise it is null. |1083| totals.pageviews | INTEGER | Total number of pageviews within the session. |1084| totals.screenviews | INTEGER | Total number of screenviews within the session. |1085| totals.sessionQualityDim | INTEGER | An estimate of how close a particular session was to transacting, ranging from 1 to 100, calculated for each session. A value closer to 1 indicates a low session quality, or far from transacting, while a value closer to 100 indicates a high session quality, or very close to transacting. A value of 0 indicates that Session Quality is not calculated for the selected time range. |1086| totals.timeOnScreen | INTEGER | The total time on screen in seconds. |1087| totals.timeOnSite | INTEGER | Total time of the session expressed in seconds. |1088| totals.totalTransactionRevenue | INTEGER | Total transaction revenue, expressed as the value passed to Analytics multiplied by 10^6 (e.g., 2.40 would be given as 2400000). |1089| totals.transactionRevenue | INTEGER | This field is deprecated. Use ""totals.totalTransactionRevenue"" instead (see above). |1090| totals.transactions | INTEGER | Total number of ecommerce transactions within the session. |1091| totals.UniqueScreenViews | INTEGER | Total number of unique screenviews within the session. |1092| totals.visits | INTEGER | The number of sessions (for convenience). This value is 1 for sessions with interaction events. The value is null if there are no interaction events in the session. |1093| trafficSource | RECORD | This section contains information about the Traffic Source from which the session originated. |1094| trafficSource.adContent | STRING | The ad content of the traffic source. Can be set by the utm_content URL parameter. |1095| trafficSource.adwordsClickInfo | RECORD | This section contains information about the Google Ads click info if there is any associated with this session. Analytics uses the last non-direct click model. |1096| trafficSource.<br>      adwordsClickInfo.adGroupId | INTEGER | The Google ad-group ID. |1097| trafficSource.<br>      adwordsClickInfo.adNetworkType | STRING | Network Type. Takes one of the following values: {“Google Search"", ""Content"", ""Search partners"", ""Ad Exchange"", ""Yahoo Japan Search"", ""Yahoo Japan AFS"", “unknown”} |1098| trafficSource.<br>      adwordsClickInfo.campaignId | INTEGER | The Google Ads campaign ID. |1099| trafficSource.<br>      adwordsClickInfo.creativeId | INTEGER | The Google ad ID. |1100| trafficSource.<br>      adwordsClickInfo.criteriaId | INTEGER | The ID for the targeting criterion. |1101| trafficSource.<br>      adwordsClickInfo.criteriaParameters | STRING | Descriptive string for the targeting criterion. |1102| trafficSource.<br>      adwordsClickInfo.customerId | INTEGER | The Google Ads Customer ID. |1103| trafficSource.<br>      adwordsClickInfo.gclId | STRING | The Google Click ID. |1104| trafficSource.<br>      adwordsClickInfo.isVideoAd | BOOLEAN | True if it is a Trueview video ad. |1105| trafficSource.<br>      adwordsClickInfo.page | INTEGER | Page number in search results where the ad was shown. |1106| trafficSource.<br>      adwordsClickInfo.slot | STRING | Position of the Ad. Takes one of the following values:{“RHS"", ""Top""} |1107| trafficSource.<br>      adwordsClickInfo.targetingCriteria | RECORD | Google Ads targeting criteria for a click. There are multiple types of targeting criteria, but should have only one value for each criterion. |1108| trafficSource.<br>      adwordsClickInfo.targetingCriteria.<br>      boomUserlistId | INTEGER | Remarketing list ID (if any) in Google Ads, derived from matching_criteria in click record. |1109| trafficSource.campaign | STRING | The campaign value. Usually set by the utm_campaign URL parameter. |1110| trafficSource.campaignCode | STRING | Value of the utm_id campaign tracking parameter, used for manual campaign tracking. |1111| trafficSource.isTrueDirect | BOOLEAN | True if the source of the session was Direct (meaning the user typed the name of your website URL into the browser or came to your site via a bookmark), This field will also be true if 2 successive but distinct sessions have exactly the same campaign details. Otherwise NULL. |1112| trafficSource.keyword | STRING | The keyword of the traffic source, usually set when the trafficSource.medium is ""organic"" or ""cpc"". Can be set by the utm_term URL parameter. |1113| trafficSource.medium | STRING | The medium of the traffic source. Could be ""organic"", ""cpc"", ""referral"", or the value of the utm_medium URL parameter. |1114| trafficSource.referralPath | STRING | If trafficSource.medium is ""referral"", then this is set to the path of the referrer. (The host name of the referrer is in trafficSource.source.) |1115| trafficSource.source | STRING | The source of the traffic source. Could be the name of the search engine, the referring hostname, or a value of the utm_source URL parameter. |1116| socialEngagementType | STRING | Engagement type, either ""Socially Engaged"" or ""Not Socially Engaged"". |1117| channelGrouping | STRING | The Default Channel Group associated with an end user's session for this View. |1118| device | RECORD | This section contains information about the user devices. |1119| device.browser | STRING | The browser used (e.g., ""Chrome"" or ""Firefox""). |1120| device.browserSize | STRING | The viewport size of users' browsers. This captures the initial dimensions of the viewport in pixels and is formatted as width x height, for example, 1920x960. |1121| device.browserVersion | STRING | The version of the browser used. |1122| device.deviceCategory | STRING | The type of device (Mobile, Tablet, Desktop). |1123| device.mobileDeviceInfo | STRING | The branding, model, and marketing name used to identify the mobile device. |1124| device.mobileDeviceMarketingName | STRING | The marketing name used for the mobile device. |1125| device.mobileDeviceModel | STRING | The mobile device model. |1126| device.mobileInputSelector | STRING | Selector (e.g., touchscreen, joystick, clickwheel, stylus) used on the mobile device. |1127| device.operatingSystem | STRING | The operating system of the device (e.g., ""Macintosh"" or ""Windows""). |1128| device.operatingSystemVersion | STRING | The version of the operating system. |1129| device.isMobile<br><br>      This field is deprecated. Use device.deviceCategory instead. | BOOLEAN | If the user is on a mobile device, this value is true, otherwise false. |1130| device.mobileDeviceBranding | STRING | The brand or manufacturer of the device. |1131| device.flashVersion | STRING | The version of the Adobe Flash plugin that is installed on the browser. |1132| device.javaEnabled | BOOLEAN | Whether or not Java is enabled in the browser. |1133| device.language | STRING | The language the device is set to use. Expressed as the IETF language code. |1134| device.screenColors | STRING | Number of colors supported by the display, expressed as the bit-depth (e.g., ""8-bit"", ""24-bit"", etc.). |1135| device.screenResolution | STRING | The resolution of the device's screen, expressed in pixel width x height (e.g., ""800x600""). |1136| customDimensions | RECORD | This section contains any user-level or session-level custom dimensions that are set for a session. This is a repeated field and has an entry for each dimension that is set. |1137| customDimensions.index | INTEGER | The index of the custom dimension. |1138| customDimensions.value | STRING | The value of the custom dimension. |1139| geoNetwork | RECORD | This section contains information about the geography of the user. |1140| geoNetwork.continent | STRING | The continent from which sessions originated, based on IP address. |1141| geoNetwork.subContinent | STRING | The sub-continent from which sessions originated, based on IP address of the visitor. |1142| geoNetwork.country | STRING | The country from which sessions originated, based on IP address. |1143| geoNetwork.region | STRING | The region from which sessions originate, derived from IP addresses. In the U.S., a region is a state, such as New York. |1144| geoNetwork.metro | STRING | The Designated Market Area (DMA) from which sessions originate. |1145| geoNetwork.city | STRING | Users' city, derived from their IP addresses or Geographical IDs. |1146| geoNetwork.cityId | STRING | Users' city ID, derived from their IP addresses or Geographical IDs. |1147| geoNetwork.latitude | STRING | The approximate latitude of users' city, derived from their IP addresses or Geographical IDs. Locations north of the equator have positive latitudes and locations south of the equator have negative latitudes. |1148| geoNetwork.longitude | STRING | The approximate longitude of users' city, derived from their IP addresses or Geographical IDs. Locations east of the prime meridian have positive longitudes and locations west of the prime meridian have negative longitudes. |1149| geoNetwork.networkDomain | STRING | [No longer supported]<br>The domain name of user's ISP, derived from the domain name registered to the ISP's IP address. |1150| geoNetwork.networkLocation | STRING | [No longer supported]<br>The names of the service providers used to reach the property. For example, if most users of the website come via the major cable internet service providers, its value will be these service providers' names. |1151| hits | RECORD | This row and nested fields are populated for any and all types of hits. |1152| hits.dataSource | STRING | The data source of a hit. By default, hits sent from analytics.js are reported as ""web"" and hits sent from the mobile SDKs are reported as ""app"". |1153| hits.sourcePropertyInfo | RECORD | This section contains information about source property for rollup properties |1154| hits.sourcePropertyInfo.<br>      sourcePropertyDisplayName | STRING | Source property display name of Roll-Up Properties. This is valid for only Roll-Up Properties. |1155| hits.sourcePropertyInfo.<br>      sourcePropertyTrackingId | STRING | Source property tracking ID of roll-up properties. This is valid for only roll-up properties. |1156| hits.eCommerceAction | RECORD | This section contains all of the ecommerce hits that occurred during the session. This is a repeated field and has an entry for each hit that was collected. |1157| hits.eCommerceAction.action_type | STRING | The action type. Click through of product lists = 1, Product detail views = 2, Add product(s) to cart = 3, Remove product(s) from cart = 4, Check out = 5, Completed purchase = 6, Refund of purchase = 7, Checkout options = 8, Unknown = 0.<br>Usually this action type applies to all the products in a hit, with the following exception: when hits.product.isImpression = TRUE, the corresponding product is a product impression that is seen while the product action is taking place (i.e., a ""product in list view""). |1158| hits.eCommerceAction.option | STRING | This field is populated when a checkout option is specified. For example, a shipping option such as option = 'Fedex'. |1159| hits.eCommerceAction.step | INTEGER | This field is populated when a checkout step is specified with the hit. |1160| hits.exceptionInfo.exceptions | INTEGER | The number of exceptions sent to Google Analytics. |1161| hits.exceptionInfo.fatalExceptions | INTEGER | The number of exceptions sent to Google Analytics where isFatal is set to true. |1162| hits.experiment | RECORD | This row and the nested fields are populated for each hit that contains data for an experiment. |1163| hits.experiment.experimentId | STRING | The ID of the experiment. |1164| hits.experiment.experimentVariant | STRING | The variation or combination of variations present in a hit for an experiment. |1165| hits.hitNumber | INTEGER | The sequenced hit number. For the first hit of each session, this is set to 1. |1166| hits.hour | INTEGER | The hour in which the hit occurred (0 to 23). |1167| hits.isSecure | BOOLEAN | This field is deprecated. |1168| hits.isEntrance | BOOLEAN | If this hit was the first pageview or screenview hit of a session, this is set to true. |1169| hits.isExit | BOOLEAN | If this hit was the last pageview or screenview hit of a session, this is set to true.<br>There is no comparable field for a Google Analytics 4 property. |1170| hits.isInteraction | BOOLEAN | If this hit was an interaction, this is set to true. If this was a non-interaction hit (i.e., an event with interaction set to false), this is false. |1171| hits.latencyTracking | RECORD | This section contains information about events in the Navigation Timing API. |1172| hits.latencyTracking.domainLookupTime | INTEGER | The total time (in milliseconds) all samples spent in DNS lookup for this page. |1173| hits.latencyTracking.domContentLoadedTime | INTEGER | The time (in milliseconds), including the network time from users' locations to the site's server, the browser takes to parse the document and execute deferred and parser-inserted scripts (DOMContentLoaded). |1174| hits.latencyTracking.domInteractiveTime | INTEGER | The time (in milliseconds), including the network time from users' locations to the site's server, the browser takes to parse the document (DOMInteractive). |1175| hits.latencyTracking.domLatencyMetricsSample | INTEGER | Sample set (or count) of pageviews used to calculate the averages for site speed DOM metrics. |1176| hits.latencyTracking.pageDownloadTime | INTEGER | The total time (in milliseconds) to download this page among all samples. |1177| hits.latencyTracking.pageLoadSample | INTEGER | The sample set (or count) of pageviews used to calculate the average page load time. |1178| hits.latencyTracking.pageLoadTime | INTEGER | Total time (in milliseconds), from pageview initiation (e.g., a click on a page link) to page load completion in the browser, the pages in the sample set take to load. |1179| hits.latencyTracking.redirectionTime | INTEGER | The total time (in milliseconds) all samples spent in redirects before fetching this page. If there are no redirects, this is 0. |1180| hits.latencyTracking.serverConnectionTime | INTEGER | Total time (in milliseconds) all samples spent in establishing a TCP connection to this page. |1181| hits.latencyTracking.serverResponseTime | INTEGER | The total time (in milliseconds) the site's server takes to respond to users' requests among all samples; this includes the network time from users' locations to the server. |1182| hits.latencyTracking.speedMetricsSample | INTEGER | The sample set (or count) of pageviews used to calculate the averages of site speed metrics. |1183| hits.latencyTracking.userTimingCategory | STRING | For easier reporting purposes, this is used to categorize all user timing variables into logical groups. |1184| hits.latencyTracking.userTimingLabel | STRING | The name of the resource's action being tracked. |1185| hits.latencyTracking.userTimingSample | INTEGER | The number of hits sent for a particular userTimingCategory, userTimingLabel, or userTimingVariable. |1186| hits.latencyTracking.userTimingValue | INTEGER | Total number of milliseconds for user timing. |1187| hits.latencyTracking.userTimingVariable | STRING | Variable used to add flexibility to visualize user timings in the reports. |1188| hits.minute | INTEGER | The minute in which the hit occurred (0 to 59). |1189| hits.product.isImpression | BOOLEAN | TRUE if at least one user viewed this product (i.e., at least one impression) when it appeared in the product list. |1190| hits.product.isClick | BOOLEAN | Whether users clicked this product when it appeared in the product list. |1191| hits.product.customDimensions | RECORD | This section is populated for all hits containing product scope Custom Dimensions. |1192| hits.product.customDimensions.index | INTEGER | The product scope Custom Dimensions index. |1193| hits.product.customDimensions.value | STRING | The product scope Custom Dimensions value. |1194| hits.product.customMetrics | RECORD | This section is populated for all hits containing product scope Custom Metrics. |1195| hits.product.customMetrics.index | INTEGER | The product scope Custom Metrics index. |1196| hits.product.customMetrics.value | INTEGER | The product scope Custom Metrics value. |1197| hits.product.productListName | STRING | Name of the list in which the product is shown, or in which a click occurred. For example, ""Home Page Promotion"", ""Also Viewed"", ""Recommended For You"", ""Search Results List"", etc. |1198| hits.product.productListPosition | INTEGER | Position of the product in the list in which it is shown. |1199| hits.publisher.<br>      adsenseBackfillDfpClicks | INTEGER | The number of clicks on AdSense ads that served as Google Ad Manager backfill. |1200| hits.publisher.<br>      adsenseBackfillDfpImpressions | INTEGER | The number of AdSense ad impressions that were served as Google Ad Manager backfill. |

Showing the first 1,200 of 23119 lines. Download the file for the rest.