Docs

Google Analytics 4 Raw Events Extractor

What is Google Analytics 4 Extractor?

Google Analytics 4 is an analytics service to measure traffic and engagement across your websites and apps. It collects event-based data from both websites and apps.

Google Analytics 4 Direct data extractor by Electrik.AI is designed to export Google Analytics 4 raw events data and load it directly into your database/data warehouse. You do not need to have a BigQuery account to export your GA4 Raw Events data. And you no longer need to bother about unnesting the raw events data or about merging the multiple events_YYYYMMDD tables.

With Electrik.AI’s Google Analytics 4, you can get daily report in the data warehouse or database of your choice. Electrik.AI makes it easy to get the data you want so that you can focus on analysis and reporting.

How to set up Analytics for a website and/or app

How to add a Google Analytics 4 Direct Connection in Electrik.AI?

Follow these steps to connect your Google Analytics 4 Direct connection to Electrik.AI

Step 1:  Ensure you have following prerequisites to create a Google Analytics 4 Direct Connection in Electrik.AI

  1. Access to Google Analytics 4 account
  2. Google Analytics 4 Account User Id and Password.
  3. Google Analytics 4 Raw Events details.

Step 2: Sign-in into your Electrik.AI account

Step 3: Select IO in Electrik.AI dashboard

Select IO in ElectrikAI Dashboard - ElectrikAI

Step 4: Select the Connections tab in the left most panel and click on “Add” button.

Select the Connections tab in the left most panel Conn - ElectrikAI

Step 5: The Source default tab is selected just click on “Google Analytics 4 Direct” connection.

The Source default tab is selected just click on Google Analytics 4 Direct connection - ElectrikAI

Step 6: Enter your Google Analytics 4 User Id and Password.

Conn-Step 6 Enter your Google Search Console User Id and Password - ElectrikAI

Step 7: Allow Electrik.AI to view Google Account Data for your GA4 Raw Events.

Conn Step 7 Allow Electrik.AI to view Google Account Data for your GA4 property - ElectrikAI

Step 8: Choose your analytics account and raw events for which you want to Extract data.

Conn Step 8 Choose your analytics account and property for which you want to Extract data - ElectrikAI

Step 9: Click on Save button on the top right corner of the screen.

Conn Step 9 Click on Save button on the top right corner of the screen - ElectrikAI

Congratulations, you have successfully created a “Google Analytics 4 Direct” Connection in Electrik.AI

Congratulations, you have successfully created a “Google Analytics 4 Direct” Connection - ElectrikAI

What are the supported Data Destinations?

Electrik.AI supports the following databases and Data Warehouse to export Google Analytics 4 Data. It is important to note that Electrik.AI itself is not a destination. A destination is required to export data from various marketing data sources using Electrik.AI

PostgreSQL Data Destination-Eletrik.AI
MySQL Data Destination-Electrik.AI
AzureSQL Data Destination-Eletrik.AI
Google Big Query Data Destination-Elecrik.AI
Azure Blob Storage - ElectrikAI

How to export Google Analytics 4 Data?

Electrik.AI creates a data flow (or ETL process) that exports Google Analytics 4 data to a target database or data warehouse or data base. This process runs daily at scheduled time and exports data for the previous day.

Follow these steps to create a Data Flow from Google Analytics 4 Direct to Google BigQuery

Step 1: Ensure you have the following prerequisites.

  1. Access to Google Analytics 4 account
  2. Google Analytics Account 4 User Id and Password.
  3. Google Analytics 4 Raw Events details.
  4. Access to a Database of your choice (PostgreSQL, MySQL, Azure SQL)
  5. Database Connection Details such as Host, Port, DB Name, DB User.

Step 2: Sign-in into your Electrik.AI account.
Step 3: Select IO in Electrik.AI dashboard

Select IO in ElectrikAI Dashboard - ElectrikAI

Step 4: Select the Connections Icon in the left most panel and Click on Add button to create a Google Analytics 4 Direct Data Extractor Flow.

Select the Connections Icon in the left most panel Flow - ElectrikAI

Step 5: Select Google Analytics 4 Direct Connection present in the list of available sources.

Select Google Analytics 4 BigQuery (Service Account) Connection present in the list of available sources - ElectrikAI

Step 6: Select your existing Google Analytics 4 Direct connection in Electrik.AI.

Flow-Step 6 Select your existing Google Analytics 4 Direct connection - ElectrikAI

To configure a new connection, refer to this link.

Step 7: Click on a destination of your choice from list of available destinations.

In this example we are choosing Azure SQL.

Step 7 Select a destination of your choice (Azure SQL)

Step 8: Click on a destination of your choice from list of available destinations.

Step 8 Click on a destination of your choice from list of available destinations(Azure) - ElectrikAI

 Step 9: Review the Data Source, Data Destination, Database Schema, Provide Success Notification Email, Failure Notification Email. Click “Save and Proceed” to continue.

Flow Step9 Review the Data Source Data Destination Database Schema - ElectrikAI

Success Notification Email: Enter a valid Email ID to receive the Flow Success Email Notification.
Failure Notification Email: Enter a valid Email ID to receive the Flow Failure Email Notification.
Note: By Default, Electrik.AI uses the signed-in user’s Email Id.

Congratulations, Flow is created. Please wait while you are redirected to Flow Details Screen.

Congratulations, Flow is created(Azure). Please wait while you are redirected to Flow Details Screen - ElectrikAI

You have now successfully setup Google Analytics 4 Direct to Azure SQL flow in Electrik.AI

You have now successfully setup Google Analytics 4 Direct to Azure flow in Electrik.AI

Your Google Analytics 4 data will start loading after 24 hours in your Azure SQL Dataset.

Azure SQL DataSet - ElectrikAI

Google Analytics 4 Raw Events Data Schemas

Index Category Electrik.AI Column Name Description Sample Value
1 Electrik.AI sha_id The unique ID of event params record.

e5c929898893dd4c7a3b97

377881e0f5e0ede5b965d50d

86c22043ad23122860

2 Electrik.AI account_id The unique ID of your account. 44444444
3 Electrik.AI property_id The unique ID of your GA4 Property. 311111111
4 Event event_date The date when the event was logged (YYYYMMDD format in the registered timezone of your app). 20230808
5 Event event_timestamp The time (in microseconds, UTC) when the event was logged on the client. 1689956636271690
6 Event event_name The name of the event. page_view
7 Event event_previous_timestamp The time (in microseconds, UTC) when the event was previously logged on the client.
8 Event event_value_in_usd The currency-converted value (in USD) of the event’s “value” parameter.
9 Event

event_bundle_

sequence_id

The sequential ID of the bundle in which these events were uploaded. -2065318994
10 Event

event_server_timestamp

_offset

Timestamp offset between collection time and upload time in micros.
11 User user_id The unique ID assigned to a user.
12 User user_pseudo_id The pseudonymous id (e.g., app instance ID) for the user. 1339097149
13 Privacy Info privacy_info_ The privacy_info fields contain information based on the consent status of a user when consent mode
is enabled.
14 Privacy Info

privacy_info_analytics

_storage

Whether Analytics storage is enabled for the user. Possible values: Yes, No, Unset
15 Privacy Info privacy_info_ads_storage Whether ad targeting is enabled for a user. Possible values: Yes, No, Unset
16 Privacy Info

privacy_info_uses_

transient_token

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
No
17 Event

user_first_touch_

timestamp

1.69132E+15
18 User ltv user_ltv The user_ltv RECORD contains Lifetime Value information about the user. This RECORD is not populated
in intraday tables.
19 User ltv user_ltv_revenue The Lifetime Value (revenue) of the user. This field is not populated in intraday tables. 0
20 User ltv user_ltv_currency The Lifetime Value (currency) of the user. This field is not populated in intraday tables. USD
21 Device device_category The device category (mobile, tablet, desktop). desktop
22 Device device_mobile_brand_name The device brand name. Apple
23 Device device_mobile_model_name The device model name. Safari
24 Device

device_mobile_marketing_

name

The device marketing name.
25 Device

device_mobile_os_

hardware_typel

The device model information retrieved directly from the operating system.
26 Device device_operating_system The operating system of the device. Macintosh
27 Device

device_operating_system

_version

The OS version. Macintosh Intel 10.15
28 Device device_vendor_id IDFV (present only if IDFA is not collected).
29 Device device_advertising_id Advertising ID/IDFA.
30 Device device_language The OS language. en-gb
31 Device

device_is_limited_ad

_tracking

The device’s Limit Ad Tracking setting.On iOS14+, returns false if the IDFA is non-zero. No
32 Device

device_time_zone_offset

_seconds

The offset from GMT in seconds.
33 Device device_browser The browser in which the user viewed content.
34 Device device_browser_version The version of the browser in which the user viewed content.
35 Device device_web_info_browser The browser in which the user viewed content. Chrome
36 Device

device_web_info

_browser_version

The version of the browser in which the user viewed content. 108.0.0.0
37 Device

device_web_info

_hostname

The hostname associated with the logged event. mosnil.in
38 Geo geo_continent The continent from which events were reported, based on IP address. Americas
39 Geo geo_country The country from which events were reported, based on IP address. United States
40 Geo geo_region The region from which events were reported, based on IP address.
41 Geo geo_city The city from which events were reported, based on IP address.
42 Geo geo_sub_continent The subcontinent from which events were reported, based on IP address. Northern America
43 Geo geo_metro The metro from which events were reported, based on IP address. (not set)
44 App Info app_info_id The package name or bundle ID of the app.
45 App Info app_info_version The app’s versionName (Android) or short bundle version.
46 App Info app_info_install_store The store that installed the app.
47 App Info app_info_firebase_app_id The Firebase App ID associated with the app
48 App Info app_info_install_source
49 Traffic Source traffic_source_name Name of the marketing campaign that first acquired the user. This field is not populated in intraday
tables.
(direct)
50 Traffic Source traffic_source_medium Name of the medium (paid search, organic search, email, etc.) that first acquired the user. This
field is not populated in intraday tables.
(none)
51 Traffic Source traffic_source_source Name of the network that first acquired the user. This field is not populated in intraday tables. (direct)
52 Stream stream_id The numeric ID of the data stream from which the event originated. 3497730613
53 Platform platform The data stream platform (Web, IOS or Android) from which the event originated. WEB
54 Event event_dimensions_hostname
55 Ecommerce ecommerce_total_item_quantity Total number of items in this event, which is the sum of items.quantity.
56 Ecommerce

ecommerce_purchase

_revenue_in_usd

Purchase revenue of this event, represented in USD with standard unit. Populated for purchase event
only.
57 Ecommerce

ecommerce_purchase

_revenue

Purchase revenue of this event, represented in local currency with standard unit. Populated for
purchase event only.
58 Ecommerce

ecommerce_refund_value

_in_usd

The amount of refund in this event, represented in USD with standard unit. Populated for refund
event only.
59 Ecommerce ecommerce_refund_value The amount of refund in this event, represented in local currency with standard unit. Populated for
refund event only.
60 Ecommerce

ecommerce_shipping

_value_in_usd

The shipping cost in this event, represented in USD with standard unit.
61 Ecommerce ecommerce_shipping_value The shipping cost in this event, represented in local currency.
62 Ecommerce

ecommerce_tax

_value_in_usd

The tax value in this event, represented in USD with standard unit.
63 Ecommerce ecommerce_tax_value The tax value in this event, represented in local currency with standard unit.
64 Ecommerce ecommerce_unique_items The number of unique items in this event, based on item_id, item_name, and item_brand.
65 Ecommerce ecommerce_transaction_id The transaction ID of the ecommerce transaction.
Index Category Electrik.AI Column Name Description Sample Value
1 Electrik.AI sha_id The unique ID of event params record.

e5c929898893dd4c7a3b9

7377881e0f5e0ede5b965d50d8

6c22043ad23122860

2 Electrik.AI account_id The unique ID of your account. 44444444
3 Electrik.AI property_id The unique ID of your GA4 Property. 311111111
4 Event event_date The date when the event was logged (YYYYMMDD format in the registered timezone of your app). 20230808
5 Event event_timestamp The time (in microseconds, UTC) when the event was logged on the client. 1689956636271690
6 Event event_name The name of the event.
7 User user_pseudo_id The pseudonymous id (e.g., app instance ID) for the user.
8 Event Params params_key The name of the event parameter. page_url
9 Electrik.AI events_sha_id The corresponding sha_id of event table.
10 Event Params params_value_string_value A record containing the event parameter’s value. If the event parameter is represented by a string,
such as a URL or campaign name, it is populated in this field.
https://electrik.ai/docs/google-analytics-4
11 Event Params params_value_int_value A record containing the event parameter’s value. If the event parameter is represented by an integer,
it is populated in this field.
12 Event Params params_value_float_value A record containing the event parameter’s value. If the event parameter is represented by a floating
point value, it is populated in this field. This field is not currently in use.
13 Event Params params_value_double_value A record containing the event parameter’s value. If the event parameter is represented by a double
value, it is populated in this field.
Index Category Electrik.AI Column Name Description Sample Value
1 Electrik.AI sha_id The unique ID of user properties record.

e5c929898893dd4c7a3b97

377881e0f5e0ede5b965d50

d86c22043ad23122860

2 Electrik.AI account_id The unique ID of your account. 44444444
3 Electrik.AI property_id The unique ID of your GA4 Property. 311111111
4 Event event_date The date when the event was logged (YYYYMMDD format in the registered timezone of your app). 20230808
5 Event event_timestamp The time (in microseconds, UTC) when the event was logged on the client. 1689956636271690
6 Event event_name The name of the event. first_visit
7 User user_pseudo_id The pseudonymous id (e.g., app instance ID) for the user. 11111111.111111100
8 User user_properties_key The name of the user property. customer_name
9 Electrik.AI events_sha_id The corresponding sha_id of event table.

e5c929898893dd4c7a3b9

7377881e0f5e0ede5b96

5d50d86c22043ad2312

2860

10 User Properties user_properties_value_string_value A record for the user property string value. electrik ai
11 User Properties user_properties_value_int_value A record for the user property integer value. 132
12 User Properties user_properties_value_double_value A record for the user property double value.
13 User Properties user_properties_value_float_value A record for the user property float value.
14 User Properties user_properties_value_set_timestamp_micros A record for the user property value.The time (in microseconds) at which the user property was last
set.
1,689,956,612,878,130
Index Category Electrik.AI Column Name Description Sample Value
1 Electrik.AI sha_id The unique ID of items record.

e5c929898893dd4c7a3b

97377881e0f5e0ede5b965d

50d86c22043ad23122860

2 Electrik.AI account_id The unique ID of your account. 44444444
3 Electrik.AI property_id The unique ID of your GA4 Property. 311111111
4 Event event_date The date when the event was logged (YYYYMMDD format in the registered timezone of your app). 20230808
5 Event event_timestamp The time (in microseconds, UTC) when the event was logged on the client. 1689956636271690
6 Event event_name The name of the event. first_visit
7 User user_pseudo_id The pseudonymous id (e.g., app instance ID) for the user.
8 Electrik.AI events_sha_id The corresponding sha_id of event table.

e5c929898893dd4c7a3b97

377881e0f5e0ede5b965d50d

86c22043ad23122860

9 Items item_id The ID of the item. A111
10 Items item_name The name of the item. EAI
11 Items item_brand The brand of the item. EAI
12 Items item_variant The variant of the item.
13 Items item_category The category of the item. MARKETING
14 Items item_category2 The sub category of the item.
15 Items item_category3 The sub category of the item.
16 Items item_category4 The sub category of the item.
17 Items item_category5 The sub category of the item.
18 Items price_in_usd The price of the item, in USD with standard unit. 9
19 Items price The price of the item in local currency.
20 Items quantity The quantity of the item. Quantity set to 1 if not specified. 1
21 Items item_revenue_in_usd The revenue of this item, calculated as price_in_usd * quantity. It is populated for purchase events
only, in USD with standard unit.
22 Items item_revenue The revenue of this item, calculated as price * quantity. It is populated for purchase events only,
in local currency with standard unit.
23 Items item_refund_in_usd The refund value of this item, calculated as price_in_usd * quantity. It is populated for refund
events only, in USD with standard unit.
24 Items item_refund The refund value of this item, calculated as price * quantity. It is populated for refund events
only, in local currency with standard unit.
25 Items coupon Coupon code applied to this item.
26 Items affiliation A product affiliation to designate a supplying company or brick and mortar store location.
27 Items location_id The location associated with the item.
28 Items item_list_id The ID of the list in which the item was presented to the user.
29 Items item_list_name The name of the list in which the item was presented to the user.
30 Items item_list_index The position of the item in a list.
31 Items promotion_id The ID of a product promotion.
32 Items promotion_name The name of a product promotion.
33 Items creative_name The name of a creative used in a promotional spot.
34 Items creative_slot The name of a creative slot.