Skip to main content

Modules

Modules are the fundamental building blocks of GA4Dataform. Every feature, from the core GA4 tables to advanced analytics capabilities, is organized as a self-contained module. This modular architecture provides standardized management, clear dependencies, and flexible control over your data transformation pipeline.

Walkthrough Video

Why Modules?

The module system offers several key benefits:

  • Independent Control - Enable or disable any feature without affecting others
  • Clear Dependencies - Modules explicitly declare what they depend on
  • Standardized Structure - Consistent organization across all features

Module Types

Core Module: GA4

The GA4 module is included with both Core and Premium packages. It transforms your raw GA4 export into analysis-ready tables:

  • ga4_events - Flattened event data with custom parameters
  • ga4_sessions - Session-level aggregations and metrics
  • ga4_transactions - E-commerce transaction data

Location: definitions/core/modules/ga4/

Premium Modules 💎

Premium modules provide specialized analytics and reporting capabilities. See the Available Modules section below for details.

How Modules Work

Each module follows a consistent structure:

SQLX Models: definitions/core/modules/[module_name]/

  • All data transformation logic (sources, intermediate tables, outputs)

Module Configuration: includes/custom/modules/[module_name]/config.js, config.json, or config.yaml

  • Module-specific settings and customizations
  • Preserved during updates
GA4 Module Configuration

The GA4 module uses a two-tier configuration system with both core and custom configs:

  • Core: includes/core/modules/ga4/config.js (default settings, updated during installations)
  • Custom: includes/custom/modules/ga4/config.js (your overrides, preserved during updates)

All other modules use only the custom configuration file in includes/custom/modules/[module_name]/.

Module Configuration

Every module has a configuration file that controls its behavior.

GA4 Module (Two-Tier Configuration)

The GA4 module is unique in having both core and custom configuration files:

Core Configuration (includes/core/modules/ga4/config.js):

  • Default settings provided by GA4Dataform
  • Updated when you install or update packages
  • Should not be modified directly

Custom Configuration (includes/custom/modules/ga4/config.js):

  • Your custom overrides and settings
  • Merged with core configuration at runtime
  • Preserved during updates
Configuration Priority

Settings in your custom configuration override the core configuration. This allows you to maintain customizations while receiving updates to default settings.

Premium Modules 💎

Premium modules use a single configuration file located in includes/custom/modules/[module_name]/. All module settings are defined here, and this file is preserved during updates.

Updating Custom Configurations

Custom configuration files (includes/custom/modules/[module_name]/) are never overwritten during updates. When new configuration options are added to GA4Dataform, you must manually add them to your custom configuration files.

After updating to a new version, review the Configuration Variables documentation to see if new options have been added that you want to enable.

Common Configuration Properties

All modules include these standard properties:

  • enabled (boolean) - Activates or deactivates the module
  • version (number) - Tracks configuration version
  • dependencies (array, optional) - Lists other modules that the current module depends on (e.g., ["ga4"])

Module-Specific Settings

Each module provides additional configuration options for:

  • Custom parameters and dimensions
  • Filters and exclusions
  • Lookback periods and date ranges
  • Cost parameters and exchange rates
  • Conversion events and funnel definitions

Configuration files can be in JavaScript (.js), JSON (.json), or YAML (.yaml) format depending on the module. See individual module documentation for specific settings and examples.

Looker Studio Template

tip

We created a free-to-use Looker Studio template that was specifically designed to work with the GA4Dataform modules. Feel free to copy it and adapt it to your needs! You can find it here.

Available Modules

Configuration: includes/custom/modules/google_ads/config.yaml

Transforms raw Google Ads Data Transfer tables into a more analysis-ready, efficient format. It joins metrics and dimensions from different raw Google Ads tables (BasicStats, ConversionStats, Lookup tables) and enables simplified reporting across ad entities.

Key Features:

  • Easily consolidate data from multiple Google Ads accounts (not just under the same MCC account)
  • Maintain latest metadata for ad entities efficiently (campaigns, ads, ad groups, keywords, gclid)
  • Deduplicated, incremental GCLID table that can be joined to other data sources (such as GA4) in downstream queries
  • Flexible configuration for multiple conversion actions
  • Process only new data from certain raw Ads tables that can get costly in high volume accounts

Output Tables:

  • google_ads_dim_accounts, google_ads_dim_campaigns, google_ads_dim_ad_groups, google_ads_dim_ads, google_ads_dim_keywords - Dimension tables
  • google_ads_gclids - GCLID tracking table
  • google_ads_campaign_report, google_ads_ad_group_report, google_ads_ad_report, google_ads_keyword_report, google_ads_paid_organic_search_term_report - Metrics tables

GA4 Item Funnel

Configuration: includes/custom/modules/ga4_item_funnel/config.json

Provides detailed funnel analysis for e-commerce items, tracking item interactions throughout the customer journey.

Key Features:

  • Comprehensive item dimension breakdowns (ID, name, brand, variant, categories)
  • Channel and device segmentation options
  • Custom item parameters support
  • Session-level dimensional analysis
  • Three aggregation levels: events, sessions, and users
  • Revenue and quantity tracking

Output Tables:

  • ga4_item_funnel_report - Item funnel metrics and analysis
  • ga4_item_funnel_sessions - Session-level item data

GA4 Parameter Detection

Configuration: includes/custom/modules/ga4_parameter_detection/config.yaml

Automatically discovers and tracks user properties, custom event parameters, and item parameters in your GA4 raw export. This module helps you identify and explore which parameters are being collected in your implementation.

Key Features:

  • Tracks both configured and discovered parameters
  • Provides filtering options (include/exclude parameters, categories)
  • Provides sample values for analysis
  • Configurable lookback periods
  • Provides a formatted config.js suggestion for the discovered parameters

Output Tables:

  • ga4_parameter_detection_report_daily - Daily parameter tracking
  • ga4_parameter_detection_aggregated - Aggregated parameter insights
  • ga4_parameter_detection_config_suggestions - Configuration suggestions for discovered parameters

GCP Cost Monitoring

Configuration: includes/custom/modules/gcp_cost/config.json

Monitors and reports on BigQuery costs associated with your GA4Dataform implementation, including processing, storage, and query costs.

Key Features:

  • Processing cost tracking ($5 per TB default)
  • Storage cost monitoring ($0.02 per GB per month default)
  • Exchange rate multiplier support
  • Historical cost analysis from configurable start date

Output Tables:

  • gcp_cost_overview - Consolidated cost summary
  • gcp_cost_processing - Query processing costs
  • gcp_cost_storage - Data storage costs
  • gcp_cost_reporting - Detailed cost reports
  • info_schema_jobs_queries - Query execution details
  • info_schema_jobs_scripts - Script execution tracking

GA4 Event Conversion Rate

Configuration: includes/custom/modules/ga4_event_conversion_rate/config.json

Analyzes session-level conversion rates for specific events, providing detailed funnel analysis capabilities.

Key Features:

  • Configurable conversion events (default: "purchase")
  • Event exclusion filters (user_engagement, first_visit, session_start)
  • Multiple dimensional breakdowns (channel grouping, device, campaign data)
  • Custom session dimensions support

Output Tables:

  • ga4_event_conversion_rates_report - Main conversion rate reporting table

What should we build next?

Building with modules creates a whole world of possibilities as we can explore features beyond the core models. Let us know if you have any feedback regarding the existing modules or what we should build next at support@superformlabs.eu!