Skip to content

GTM dataLayer: Technical Reference

Version 1 of the intake dataLayer contract. Events are pushed client-side from the intake app through a no-PHI dataLayer helper.

DataLayer

Karpa loads your GTM container on every intake page. Before the tags run, the page exposes a standard window.dataLayer array. All events are pushed as:

window.dataLayer.push({ event: "<event-name>", ...params });

The helper no-ops safely when GTM is not configured for the tenant, so a missing container never breaks the form.

Privacy constraint

Params carry only marketing-safe values: funnel step names, program/plan identifiers, and prices. They never include patient name, email, date of birth, address, phone, or medical answers.

Event catalog

intake_form_started

Fires when the patient begins the intake form (step 1).

{
event: "intake_form_started",
program: "<program-slug>", // string
step: 1, // number
step_id: "<page-id>", // string, e.g. "vitals"
step_name: "<page-label>" // string, e.g. "Basic Info"
}

intake_step_view

Fires when the patient reaches a new step in the form.

{
event: "intake_step_view",
program: "<program-slug>", // string
step: <n>, // number, 2..N
step_id: "<page-id>", // string, e.g. "medical-history"
step_name: "<page-label>" // string, e.g. "Medical History"
}

intake_checkout_view

Fires when the patient reaches the checkout step.

{
event: "intake_checkout_view",
program: "<program-slug>", // string
priceCents: <n> // number, price in USD cents
}

intake_payment_authorized

Fires when the patient authorizes payment at checkout — the card is captured, but no money is charged yet. The actual charge happens later, server-side, when the prescription is approved/settled. Emitted for initial purchases and follow-up/renewal purchases.

{
event: "intake_payment_authorized",
program: "<program-slug>", // string
priceCents: <n> // number, discounted total the patient will be charged, in USD cents
}

Important for tag setup: this is an authorization event, not a purchase/conversion. Do not use it as a “Purchase” or “CompletePayment” trigger — the money has not moved yet. Use it for payment-start / funnel signals, and reconcile against a real charge event (e.g. a server-side settlement signal) for purchase attribution.

intake_form_submitted

Fires when the patient reaches the confirmation page after submitting the form.

{
event: "intake_form_submitted",
program: "<program-slug>" // string
}

Field reference

Field Type Description
program string Program slug identifier (e.g. weight-loss)
step number 1-based intake form step index
step_id string Intake page/screen id (e.g. medical-history) — intake_step_view / intake_form_started
step_name string Human screen label (e.g. Medical History) — intake_step_view / intake_form_started
priceCents number Checkout price in USD cents (integer)

Notes

  • Event names and fields are additive-only within version 1. New fields may be added in minor revisions; existing fields will not be removed or repurposed without a new version.
  • priceCents is the amount presented to the patient at checkout. Discounts and promotional pricing are reflected in the value pushed at purchase time.