Integration Specifications

This article will help you learn about how Daasity replicates data from Google Analytics 4, limitations to the data we can extract and where the data is stored in the Google Analytics 4 schema.

Integration Overview

Google Analytics 4 is Google's free web analytics service that allows you to analyze in-depth detail about the visitors on your website. It provides valuable insights that can help you to shape the success of your business.

The Daasity GA4 API extractor pulls a standard set of data via the Analytics Data API. Similar to Universal Analytics / GA3 this endpoint has certain limitations on both available dimensions and metrics. More information on what can be extracted is available here:

Integration Availability

This integration is available for:

  • Enterprise

  • Growth

API Endpoints

The Daasity GA4 extractor is built based on the Analytics Data API. We use the endpoint noted in the Creating a Report section to extract data from GA4.

Entity Relationship Diagram (ERD)

Click here to view the ERD for the GA4 via API integration illustrating the different tables and keys to join across tables.

Google Analytics 4 Schema

The Daasity GA4 via API extractor creates these tables using the endpoints and replication methods listed. The data is mapped from the source API endpoint to the table based on the mapping logic outlined in each table.​

Base Traffic

  • Update Method: UPSERT

  • Table Name: [ga4_api.base_traffic]

  • Sync Key: [streamId + date + sessionSource + sessionMedium + sessionCampaignName + sessionDefaultChannelGrouping + newVsReturning + deviceCategory + countryId]

Base Shopping Stage

  • Update Method: UPSERT

  • Table Name: [ga4_api.base_shopping_stage]

  • Sync Key: [streamId + date + sessionSource + sessionMedium + sessionCampaignName + eventName + sessionDefaultChannelGrouping + newVsReturning + deviceCategory]

This extraction applies a number of filters to the report:

  • Event Name on the following

    • session_start

    • view_item

    • add_to_cart

    • view_cart

    • begin_checkout

    • purchase

    • add_payment_info

    • add_shipping_info

    • view_item_list

    • select_item

Base PDP Performance

  • Update Method: UPSERT

  • Table Name: [ga4_api.base_pdp_performance]

  • Sync Key: [streamId + date + itemName + itemID]

Base Transactions

  • Update Method: UPSERT

  • Table Name: [ga4_api.base_transactions]

  • Sync Key: [streamId + date + transactionId]

NOTE: The [base_transactions] table has all the fields across all transactions tables so that a single table can be created. To fully populate this table SQL code needs to be run to update the [base_transactions] table from the staging and DDA transactions table.

Base Transactions DDA

  • Update Method: UPSERT

  • Table Name: [ga4_api.base_transactions_dda]

  • Sync Key: [streamId + date + transactionId + source + medium + campaignName + defaultChannelGrouping + manualAdContent + manualTerm]

Base Transactions Stage 2

  • Update Method: UPSERT

  • Table Name: [ga4_api.base_transactions_stg_2]

  • Sync Key: [streamId + date + transactionId]

Base Transactions Stage 3

  • Update Method: UPSERT

  • Table Name: [ga4_api.base_transactions_stg_3]

  • Sync Key: [streamId + date + transactionId]

Base Transactions Stage 4

  • Update Method: UPSERT

  • Table Name: [ga4_api.base_transactions_stg_4]

  • Sync Key: [streamId + date + transactionId]

Last updated