Lesson 6 of 8
Transformations & Enrichment
Because the data now passes through infrastructure you control, you can change it before it reaches any vendor, something impossible on the client.
Transformations
A transformation modifies the event data applied to a set of tags, for example redacting a parameter, renaming a field, or adding a default. It is the clean way to shape outbound data globally rather than editing every tag.
Enrichment
- Look up extra attributes (e.g. product margin, customer tier) and attach them to the event.
- Add geo or device data derived server-side.
- Hash user-provided data (email, phone) for ad-platform matching, away from the browser.
Redaction
The flip side of enrichment: strip data a vendor should not receive (PII in a URL, an internal id) before forwarding. The server is the right place to enforce these rules once, for every destination.
// Conceptually, in a transformation: // event.user_data.customer_tier = lookup(event.user_id) // delete event.page_location_query // drop a PII-bearing query string
Key takeaway
Transformations let you enrich, normalise and redact event data centrally before it leaves your server, so every destination gets exactly what it should and nothing it shouldn't.