Installation
#
Dataform initial setupInitialize a new Dataform project and initialize development workspace following the instructions. Or you could read blog post.
As a short check list you should do the following steps:
- Enable GA4 export to BigQuery (in GCP account with enabled billing)
- Enable Dataform API
- Create Dataform repository
- Add required roles to Dataform service account (something like: service-XXXXXXX@gcp-sa-dataform.iam.gserviceaccount.com.)
- Create GitHub (or other git) repository
- Create GitHub token with needed permissions
- In GCP Secret Manager create secreat with GitHub token
- Connect Dataform with GitHub repository
- Create Dataform development workspace
You could automate this process using Terraform. A great starting point is GitHub repository Dataform Pipeline for Google Analytics 4 created by Moritz Bauer.
#
Package setupAdd latest version of dataform-ga4-sessions
package into your project dependencies in package.json
file.
For example, your package.json
could look like this:
{ "name": "my-dataform-project", "dependencies": { "@dataform/core": "2.6.7", "dataform-ga4-sessions": "https://github.com/ArtemKorneevGA/dataform-ga4-sessions/archive/refs/tags/v1.0.5.tar.gz" }}
And click "Install packages" in the Dataform web UI. Don't forget to commit and push changes. More details about Dataform packages can be found in the official documentation
You could find the package latest version here.