Lead Generation Sandbox.

Track events.
Analyze behavior.

Real-world interactions. Real data layer pushes. Configure Google Tag Manager to capture these events and route them directly to GA4.

dataLayer.push()
dataLayer.push({  event: 'generate_lead',  lead_source: 'website_form',  form_id: 'contact_main',  lead_id: 'LEAD-1708234567',  value: 50.00,  currency: 'USD'});

Tasks #3–#4

Forms

A simple contact form and a multi-step flow. Both fire real POST requests to the backend — watch for [FETCH] logs in the console.

Contact Form

Trainee Instructions: Click into the inputs below to trigger form_start and blur off them to catch form_field_interaction payloads. Submitting correctly pushes a generate_lead.

form_field_interaction: name
form_field_interaction: email

Multi-step form

Trainee Instructions: Proceed through the funnel. Each view fires form_step_view. Reaching the end yields a form_complete.

Task #5 — section_view

Features

Trainee Instructions: Scroll up and down. Each card below is tracked by an Intersection Observer. As soon as they enter your viewport, they push a section_view event to the data layer. Verify this in your console array.

GTM from scratch
Containers, tags, triggers, and variables. The fundamental mechanics.
GA4 events
Recommended event taxonomy, parameters, and custom dimensions.
Enhanced E-commerce
The complete purchase funnel in GA4 — from product views to refunds.
API Tracking
Monitor fetch requests, intercept REST responses, and fire events on external APIs.
Debugging
Preview Mode, DebugView, Network Tab — the full arsenal.
Attribution
UTM tags, source/medium logic, user properties, and attribution models.
Task #6 — video events

YouTube Player API

GTM can automatically track YouTube. Enable the 'YouTube Video' trigger to catch video_start, video_progress, and video_complete.

Task #7 — outbound_click

Outbound links

Trainee Instructions: Click the Outbound links below. We've hijacked the native behavior so it doesn't open instantly, allowing you to intercept the click, read its href, and push an outbound_click to GTM.

Task #8 — newsletter_signup
Task #9 — callback_request

Request a callback

Trainee Instructions: Entering a phone number here mocks an asynchronous POST request to the backend. Open the Network tab to watch the fetch request. Once 200 OK resolves, catch the api_success event.