Daasity Knowledge Base
Ask or search…
K

Transformation Configuration Instructions

This pages provides instructions on what transform code should be added to a script manifest file to transform Google Analytics 4 (via API) data into the Unified Traffic Schema (UTS)

Overview

The Google Analytics (via API) extractor provides data on site traffic, page performance, checkout performance and order attribution. The Daasity transformation code maps data from the GA4 schema into the Unified Traffic Schema (UTS)

Feature Dependencies

You must have enabled our Code Repository feature in order to both access the Daasity transformation code as well as modify a Script Manifest File enabling this code to execute
We recommend you review the Transformation Configuration section of our Help documentation to familiarize yourself with our workflow engine and script manifest files.

Script Manifest File (YML)

Upstream Transformation Dependencies

This code is dependent on the following integration being installed:
  • Google Analytics 4 (via API)
This code block is dependent on the following upstream code blocks being implemented:

Transformation Code Requirements

To enable the data transformation from the GA4 schema into UTS, the following code must be run in a workflow:
uts_ga4_api:
integrations:
- google_analytics_v4_api
scripts:
- "github://platform-sql-shared/scripts/base/2650_uts/2660_GA4_API_UPD_ga_comp.sql"
- "github://platform-sql-shared/scripts/base/2600_google_analytics/2650_GA4_UTS_transactions.sql"
- "github://platform-sql-shared/scripts/base/2650_uts/2654_UTS_GA4_API_shopping_stage.sql"
- "github://platform-sql-shared/scripts/base/2650_uts/2652_UTS_BAS_traffic_ga4.sql"
- "github://platform-sql-shared/scripts/base/2650_uts/2662_UTS_BAS_product_page_ga4.sql"
- "github://platform-sql-shared/scripts/base/2600_google_analytics/2710_GA4_UPD_transactions.sql"
We recommend this code be added within a UTS block that transforms all your traffic integrations into the appropriate UTS tables
If you do not add the above code to a Script Manifest File and create a Workflow with the Script Manifest File added to the workflow, the data extracted from GA4 will not be transformed into the downstream tables

Unified Traffic Schema

The following code will insert GA4 data into the [uts.ga_comp] table to allow comparisons between GA3 and GA4
The following code will insert GA4 data into the [uts.transactions] table to enable order attribution using GA4 data
The following code will insert GA4 data into the [uts.shopping_stage] table to enable analysis on your checkout funnel
The following code will insert GA4 data into the [uts.traffic] table
The following code will insert GA4 data into the [uts.product_page] table
The following code will update the [uts.transactions] table with additional fields from GA4 and ensure there are no duplicates in the table when an intra-day table is used