Analytics Lab / Instrumentation

Unified Data Layer Sandbox

Prototype a normalized event model that can power any analytics or marketing endpoint. Engage with the controls to observe the structured payloads delivered to window.dataLayer.

Schema
unified-data-layer/v2
Namespace
lab.analytics.udl

Base context snapshot

Session, user, and page objects are seeded once per visit. Every interaction extends this payload so downstream tags inherit a shared vocabulary.

Session

{
  "id": "session-0042",
  "timestamp": "2024-01-01T12:00:00Z",
  "source": "organic"
}

User

{
  "auth_state": "anonymous",
  "persona": "analyst",
  "account_tier": "explorer"
}

Page

{
  "template": "lab-sandbox",
  "section": "analytics",
  "language": "en-US"
}

Tracked interactions

Buttons, links, and forms declare their instrumentation through data attributes. A helper maps the DOM metadata into normalized payloads pushed into the data layer.

Acquisition & navigation

Hero CTAs, navigation links, and internal search queries.

View implementation checklist

Media & documents

Video milestones and download tracking for resource hubs.

Download telemetry kit (PDF)

Commerce & pipeline

Add to cart through purchase confirmation using shared product IDs.

Experience signals

Feedback loops that monitor quality, consent, and reliability.

Bootstrap snippet

Initialize the data layer early and push the session, user, and page context before registering interaction handlers.

<script>
  window.dataLayer = window.dataLayer || [];
  window.dataLayer.push({
    schema: 'unified-data-layer/v2',
    session: {/* ... */},
    user: {/* ... */},
    page: {/* ... */}
  });
</script>