Document Type: Framework
Status: Active
Authority: Data Brain
Parent: Data Brain Architecture
Applies To: All MWMS environments where tracking payloads, measurement signals, or data integrity must be controlled prior to dispatch to analytics or external systems
Version: v1.0
Last Reviewed: 2026-04-23
Purpose
The Data Brain Custom Task Control Framework defines how MWMS controls, modifies, and validates measurement payloads before they are sent to analytics systems.
Standard tracking implementations send data as generated.
Custom task control enables:
• modification of tracking payloads
• injection of additional context
• removal of invalid or sensitive data
• duplication of signals across systems
• correction of data before dispatch
This framework ensures MWMS maintains control over:
→ what data is sent
→ how data is structured
→ where data is sent
Core Principle
Data must be controlled before it is recorded.
Once data is sent:
→ it cannot be corrected
Therefore:
→ control must occur before dispatch
Position in MWMS System
This framework operates within:
• Data Brain → signal control and validation
• Measurement Integrity Framework → data correctness
• Data Trust Framework → trust enforcement
• Signal Flow Framework → data movement
It supports:
• Attribution Reliability Framework
• Event Reliability Framework
• Signal Context Framework
Custom Task Definition
A custom task is a function that modifies a measurement payload before it is sent to an analytics endpoint.
It operates at:
→ pre-dispatch stage
Where data can still be:
• modified
• enriched
• filtered
• duplicated
Custom Task Objectives
Custom task control must:
• improve data quality
• enforce data standards
• protect data integrity
• enhance signal richness
• ensure compliance
• enable system-level control
🔴 Pre Dispatch Control Rule
All critical measurement signals must be evaluated before dispatch.
If data is:
• incomplete
• incorrect
• inconsistent
• non-compliant
→ it must be corrected or blocked
Custom Task Control Capabilities
1. Data Enrichment
Add additional information to events.
Examples:
• user identifiers
• session identifiers
• campaign metadata
• funnel stage
• behavioural context
Purpose:
→ improve signal quality
2. Data Cleaning
Remove or correct invalid data.
Examples:
• remove personally identifiable information
• fix malformed values
• standardize formats
Purpose:
→ maintain compliance and consistency
3. Data Validation
Check data before sending.
Examples:
• required parameters present
• value ranges valid
• correct data types
Purpose:
→ prevent bad data from entering system
4. Data Duplication
Send data to multiple endpoints.
Examples:
• multiple analytics systems
• backup data storage
• parallel measurement pipelines
Purpose:
→ increase system robustness
5. Data Transformation
Modify structure of payload.
Examples:
• rename parameters
• reformat values
• map fields to required schema
Purpose:
→ ensure compatibility across systems
6. Data Filtering
Prevent certain events from being sent.
Examples:
• block internal traffic
• suppress duplicate events
• ignore low-value interactions
Purpose:
→ reduce noise
🔴 Data Integrity Rule
Custom task logic must not introduce:
• data distortion
• unintended duplication
• inconsistent transformation
All transformations must preserve signal meaning.
🔴 Compliance Rule
Sensitive data must never be transmitted.
Custom task must:
• remove PII
• enforce data privacy standards
• comply with platform policies
Failure to enforce compliance risks:
• legal exposure
• account suspension
• system trust degradation
🔴 Signal Enhancement Rule
Custom task should enhance signals when:
• additional context improves interpretation
• missing data can be inferred reliably
Enhancement must not:
→ fabricate behaviour
🔴 Duplication Control Rule
Duplicated data must be:
• intentional
• controlled
• consistent
Uncontrolled duplication causes:
• inflated metrics
• incorrect attribution
• false decision signals
🔴 Transformation Consistency Rule
All transformations must be:
• consistent across environments
• documented
• repeatable
Inconsistent transformations create:
→ signal fragmentation
Custom Task Implementation Context
Custom task operates within:
• analytics tracking systems
• tag management systems
• measurement pipelines
It is typically applied during:
• hit construction
• payload preparation
• dispatch process
🔴 Order of Execution Rule
Custom task must execute:
→ before data is sent
Order matters because:
• earlier transformations affect later logic
• dependencies must be respected
Incorrect execution order leads to:
• incomplete enrichment
• incorrect validation
• data inconsistency
🔴 Dependency Awareness Rule
Custom task logic may depend on:
• event parameters
• configuration state
• user state
• session context
If dependencies are missing:
→ transformation may fail
🔴 Testing Requirement
All custom task logic must be tested for:
• correct execution
• correct output
• no unintended side effects
Testing must include:
• edge cases
• different environments
• high-volume scenarios
🔴 Monitoring Requirement
Custom task performance must be monitored for:
• errors
• unexpected outputs
• data inconsistencies
Monitoring ensures:
→ early detection of issues
Relationship to Other Frameworks
Supports:
• Data Brain Measurement Integrity Framework
• Data Brain Data Trust Framework
• Data Brain Signal Flow Framework
• Data Brain Attribution Reliability Framework
• Data Brain Event Reliability Framework
Failure Modes Prevented
invalid data entering system
loss of important context
compliance violations
duplicate data distortion
inconsistent measurement
uncontrolled signal variation
Drift Protection
The system must prevent:
• undocumented custom logic
• inconsistent payload modifications
• silent failures in transformation
• degradation of data quality over time
Architectural Intent
The Data Brain Custom Task Control Framework ensures MWMS operates with:
→ full control over measurement data before it becomes system truth
It transforms tracking from:
data capture → data governance
Final Rule
If data is not controlled before dispatch:
→ it cannot be trusted after
Change Log
Version: v1.0
Date: 2026-04-23
Author: Data Brain
Change:
Initial creation of Custom Task Control Framework defining pre-dispatch data control logic.
Change Impact Declaration
Pages Created:
Data Brain Custom Task Control Framework
Pages Updated:
None
Pages Deprecated:
None
Registries Requiring Update:
MWMS Architecture Registry
Canon Version Update Required:
No
Change Log Entry Required:
Yes