Transform GA4 ecommerce data into reportful tables.
This Dataform package is designed to help e-shops evaluate ecommerce data from
Google Analaytics 4. It extracts information about ecommerce events and item parameters
and stores it in a new dataset in BigQuery. The name of the dataset will be ga4_datamart
.
Install the package @optimics/dataform-ecom-report-transform
to your dataform.
Refer to our dataform workflow, if you need help. The current
package version is
- In the
definitions
directory, create a.sqlx
file. - Insert the following code into the
.sqlx
file:
config {
type: "incremental",
schema: "ga4_datamart",
}
${ecom.query}
- In the
includes
directory, create aecom.js
file. - Insert the following code into the
.js
file:
const { getEcomQuery } = require('@optimics/dataform-ecom-report-transform')
const query = getEcomQuery({
ga4Dataset: 'optimics.analytics_12345678',
rangeCap: 30
})
module.exports = { query }