Skip to content

GTM dataLayer

Run your own Meta, Google Ads and other tags on Karpa’s intake form and Lab Order pages through your own Google Tag Manager container. Karpa loads your container and pushes stable dataLayer events, each with an event ID, for your tags to trigger on.

How it works

  1. You paste your GTM container ID in Settings → Integrations → Google Tag Manager.
  2. Karpa loads your container on every intake page and every Lab Order page, for every visitor.
  3. As the patient moves through the intake form or a Lab Order, Karpa pushes the events below into the dataLayer. You add tags in your container (Meta Pixel, Google Ads, GA4, TikTok and others) and trigger them on those events.

Karpa does not connect to Meta or Google Ads itself and sends them nothing. Your tags in your container are the only thing reporting to your ad accounts.

Karpa’s pushes carry only the Program, the form step and prices, never the patient’s name, email, phone, date of birth, address or answers. That includes intake_lead_captured, which fires when the patient’s contact details are saved. Your tags may still send page addresses and browser details as they normally do, so follow the warning at the end of this guide.

Events

Event Fires when Conversion Event
intake_form_started The patient begins the intake form (step 1) —
intake_step_view The patient reaches a new step in the form —
intake_lead_captured The patient’s contact details are saved at the contact step (once per submission in a browser session) Lead
intake_checkout_view The patient reaches the checkout step InitiateCheckout
intake_payment_authorized The patient’s card is authorized at checkout (not a charge) SubmitApplication
intake_form_submitted The patient’s submission completes (new intakes and follow-ups) —

Every push carries an event_id, a unique ID for that one push. For the events with a Conversion Event, pass event_id to your tag (see below). It de-duplicates copies of the same push, for example a browser tag and a server-side GTM tag both reporting it. A new push (a reloaded page, a patient returning to checkout) gets a new ID. In Google Ads, set the action’s Count to One to count one conversion per ad click; Meta counts every event it receives.

intake_step_view carries a step_id (page id) and step_name (screen label, for example “Medical History”), so you can build funnels in GA4 that show which screen patients leave on. Use these for your own reports only, not for ad platforms.

intake_payment_authorized is not a purchase. It fires when the card is authorized at checkout. No money has moved: the patient is charged later, only if a provider approves their treatment. Report it as SubmitApplication, never as Purchase. Its priceCents is the expected price, not money collected.

On a checkout-first form these fire earlier. A Custom Form with checkout first asks for the plan and card on its first page and the medical questions after, so intake_checkout_view fires on that first page and intake_payment_authorized when the card is saved, before the questions. They mean the same thing; expect more of them, and a longer gap to intake_form_submitted, than on your other forms.

Where Karpa pushes no conversion events:

  • Follow-up and renewal forms. They push intake_form_started, intake_step_view and intake_form_submitted like any form, but their checkout pushes neither intake_checkout_view nor intake_payment_authorized, and they push no intake_lead_captured. Don’t use intake_form_submitted as an ad conversion: it would count renewals as new patients.
  • The Patient Portal. Your container does not load there.

The exact fields of each event are in the technical reference.

Lab Order events

Lab Order pages push their own events, never the intake ones, so a trigger on an intake event never counts a Lab Order.

Event Fires when Conversion Event
lab_order_started The Lab Order flow opens —
lab_order_checkout_view The patient reaches the paying step (“Review & pay”) InitiateCheckout
lab_order_purchase The Lab Order is paid for and placed (a real charge) Purchase

A Lab Order is paid at checkout, so lab_order_purchase is money collected: report it as Purchase, with priceCents as its value. It does not fire for a declined card, or when the lab refuses the order and the patient is refunded. A Lab Order pushes no Lead and no SubmitApplication. Its events carry no program and never name the panel ordered.

Quick start: import the container template

The fastest setup is to import Karpa’s GTM container template into your container. It contains every trigger, variable and tag below, already wired to the right events and to event_id:

  • a Custom Event trigger for each event that reports a Conversion Event;
  • DLV - event_id and DLV - priceCents variables, plus Conversion value (the price in dollars);
  • the Meta Pixel base code, with Meta’s automatic events switched off (see Turn off automatic data collection), and one Meta tag per standard event, each passing its Event ID;
  • a Conversion Linker and one Google Ads conversion tag per action, each with event_id as its Transaction ID.

Before you import, have these ready:

  • your Meta Pixel ID (Meta Events Manager → your dataset → Settings);
  • in Google Ads, the conversion actions listed under Google Ads, each created as described there, with their Conversion ID and Conversion Label.

To import it:

  1. Download gtm-container-template.json.
  2. In GTM, open Admin → Import Container and choose the file. Pick a new workspace, then Merge, then Rename conflicting tags, triggers, and variables (not Overwrite). Click Continue, review the changes and Confirm. With Rename, nothing already in your container is deleted or replaced.
  3. Open Variables and replace each REPLACE_WITH_… value: your Meta Pixel ID, your Google Ads Conversion ID, and the Conversion Label of each Google Ads action.
  4. Add a Google tag on All Pages with your Google Ads tag ID (AW- followed by your Conversion ID). The conversion tags work without it, but Google Ads expects one and otherwise reports a “Missing Google tag”. If your container already has a Google tag for this Google Ads account, skip this.
  5. Remove any tag you don’t need, for example the Meta tags if you only run Google Ads, or your own copy of the Meta base code if you already load it on All Pages. If the import renamed the template’s Meta Pixel - Base because you already had a tag with that name, check each Meta event tag’s setup tag points at the base code you keep.
  6. Check it in Preview (see Check it works), then Submit and Publish. Nothing reaches your ad accounts until the version is published.

The template’s variable is called DLV - event_id, where the manual steps below call it event_id. Either works; use one name consistently.

Set up your tags in GTM by hand

If you’d rather build the tags yourself, for each event you want to report:

  1. In GTM, create a Custom Event trigger whose event name is the dataLayer event, for example intake_payment_authorized, firing on All Custom Events.
  2. Create a Data Layer Variable named event_id (Data Layer Variable Name: event_id, Data Layer Version 2). Create priceCents the same way if you want to report value.
  3. Add the tag (below) and attach the trigger.
  4. Test with GTM Preview: walk the intake form to checkout and check each event and its event_id in the Tag Assistant panel.

Meta Pixel

Trigger Meta standard event
intake_lead_captured Lead
intake_checkout_view InitiateCheckout
intake_payment_authorized SubmitApplication
lab_order_checkout_view InitiateCheckout
lab_order_purchase Purchase
  • Load your base Pixel code (PageView) on an All Pages trigger as usual, firing once per page, and add this line directly above its fbq('init', …) line: fbq('set', 'autoConfig', false, 'YOUR_PIXEL_ID'); It is required on Karpa’s pages; see Turn off automatic data collection.
  • In each event tag, set the Event ID to {{event_id}}. With a custom HTML tag, pass it as the fourth argument: fbq('track', 'SubmitApplication', {}, { eventID: '{{event_id}}' });
  • Purchase must carry value and currency, for example fbq('track', 'Purchase', { value: {{priceCents}} / 100, currency: 'USD' }, { eventID: '{{event_id}}' }); (the template’s Conversion value variable already divides by 100).
  • If you also send the same events through the Conversions API (for example from a server-side GTM container), send the same event_id there so Meta de-duplicates them.
Trigger Conversion action to create
intake_lead_captured Submit lead form
intake_checkout_view Begin checkout
intake_payment_authorized Book appointment, named for example “Intake submitted” (Google has no “Other” category; this is the closest, and keeps it apart from Lead)
lab_order_checkout_view Begin checkout
lab_order_purchase Purchase, named for example “Lab Order purchase”

Create each conversion action by hand, one at a time:

  1. Open https://ads.google.com/aw/conversions/new (or + Create → Conversion action). The button isn’t always shown on the Goals → Summary page.
  2. Choose data sources: keep Conversions on a website (your intake address), untick anything else such as phone calls, then Save and continue.
  3. Group your conversions: pick the category from the table above (click See all for Begin checkout and Book appointment), then Save and continue.
  4. Create a conversion: choose Manually with code, not “Automatically without code”. Only manual actions can be set up through Google Tag Manager.
  5. On the new row, click Edit settings: set the name, Count (see below) and value (Use different values for each conversion for the checkout and purchase actions, no value for Lead). Then Save and continue.
  6. On You are almost done!:
    • Untick “Turn on enhanced conversions”. It is ticked by default and sends patients’ hashed email addresses and phone numbers to Google. Google’s policy doesn’t allow it for medical services, and it’s the kind of sharing the FTC has penalized telehealth companies for.
    • Skip the Set up with a Google tag snippet: GTM replaces it.
    • Open the Use Google Tag Manager tab and copy the Conversion ID and Conversion Label.
    • Click Agree and finish.

The Conversion ID is the same for every action in your account; each action has its own Label.

  • Add a Conversion Linker tag on All Pages, and a Google tag with your Google Ads tag ID (AW-…) on All Pages.
  • For each conversion action, add a Google Ads Conversion Tracking tag with its Conversion ID and Label, and set Transaction ID to {{event_id}}. Google counts one conversion per transaction ID within a conversion action.
  • Set Count to One for “Submit lead form” and “Intake submitted”, and never use “Intake submitted” as a Purchase. Keep Every for the Lab Order purchase. If you report value, divide priceCents by 100.

Other platforms (GA4, TikTok and others)

Use the same triggers. Pass event_id wherever the platform accepts an event or de-duplication ID, and never map intake_payment_authorized to a Purchase or CompletePayment event.

Check it works

Check each step before you rely on the numbers. Use a test walk-through on your own intake link, not a real patient.

  1. GTM Preview. In GTM, click Preview and enter your intake link. Walk the form to checkout. In the Tag Assistant panel, each Karpa event appears in the left-hand list as it fires (intake_lead_captured after the contact step, intake_checkout_view at checkout). Click it and check:

    • Tags fired lists your Meta and Google Ads tags for that event;
    • Variables shows event_id (or DLV - event_id) as a UUID, and a price where there is one.

    For a Lab Order, open your Lab Order link in Preview and walk it the same way. Preview only works in the browser that started it; turn off ad blockers for the test.

  2. Publish the container (Submit → Publish). The next two checks load your intake outside Preview, where only the published version runs.

  3. Meta Test Events. In Meta Events Manager, open your dataset, then the Test events tab. In Confirm that your website’s events are set up correctly, enter your intake link and click Test events (ignore the server-events box and its test code). Walk the form in the window that opens. You should see exactly PageView, Lead, Initiate checkout and Submit Application, each Processed, with Manual setup and a UUID Event ID. If you see SubscribedButtonClick (“Automatically logged”) rows, automatic events are still on: fix that before going live (see Turn off automatic data collection).

  4. Google Ads. In Google Ads, open Goals → Summary. A new action shows Unverified (or Awaiting conversions) until it records its first conversion, then Active. Needs attention or Misconfigured means something is wrong. Allow up to 48 hours for the status to change. Google’s Tag Assistant (tagassistant.google.com) shows the conversion tag firing straight away.

Test conversions count as real ones in Google Ads. Exclude them from reporting, or make your test walk-through before the campaign starts.

Troubleshooting

What you see Usual cause What to do
No Karpa events in GTM Preview The container ID isn’t saved, the version isn’t published, Preview opened a different site, or an ad blocker is on Check Settings → Integrations → Google Tag Manager in the Karpa Partner Portal shows your GTM-… ID, then open Preview on your intake link in the same browser with ad blockers off
The event is listed, but your tag didn’t fire The trigger’s event name doesn’t match exactly Copy the event name from this guide. Names are case-sensitive: intake_checkout_view, not Intake_Checkout_View
A tag fired, but event_id is empty The Data Layer Variable reads the wrong key In the variable, the Data Layer Variable Name field must be exactly event_id
Google Ads reports “Missing Google tag” The container has conversion tags but no Google tag for that account Add a Google tag with your AW-… ID on All Pages, then publish
A Google Ads action has no “Use Google Tag Manager” option It was created automatically or “without code” Create the action again, manually with code (see Google Ads)
Conversions are counted twice The Event ID or Transaction ID isn’t passed, or two tags send the same event Pass event_id in every tag, and check you don’t load the Meta base code twice
More conversions than new patients A tag triggers on intake_form_submitted (it fires on renewals too), or the action counts every conversion Trigger on the Conversion Event pushes only, and set Google Ads Count to One
Ad clicks aren’t attributed The click was lost crossing from your marketing site to intake See Keep ad clicks across the hop to intake
Meta shows “restricted” or blocked events Meta classified your dataset as Health and wellness See Meta’s Health and wellness restrictions. Karpa can’t change Meta’s classification

Real purchases

The intake form has no dataLayer event for a Purchase: a patient’s card is only charged later, after a provider approves their treatment, and that happens away from the patient’s browser. Lab Orders are different: the card is charged at checkout, so lab_order_purchase reports a real Purchase.

Optimize on intake_payment_authorized (SubmitApplication). It fires seconds after the patient checks out, which is the fast signal ad platforms learn from best. A new or low-volume account can start on intake_lead_captured (Lead) and move to SubmitApplication once it has enough checkouts.

The CRM Destination (Settings → Integrations) tells your CRM when a lead is created and when a payment succeeds, for your own follow-up and reporting. Don’t forward those messages to an ad platform: they identify the patient and a health purchase, which is the kind of sharing the FTC has penalized telehealth companies for. See the CRM Webhook guide.

Keep ad clicks across the hop to intake

Most patients click an ad, land on your marketing site, then follow a link to the intake form, which runs on a different address. To keep the ad click attached:

  • Pass the URL parameters on. Make your “Start” links carry the landing page’s query string (utm_*, gclid, fbclid) through to the intake link.
  • Host intake on a subdomain of your marketing site (a custom domain such as start.yourbrand.com, set in Settings → Integrations). The click cookies your marketing site’s tags set (_fbc, _fbp, _gcl_aw) are then readable on intake.
  • Run the same tags on your marketing site (Meta Pixel, Google Conversion Linker), so those cookies are set when the patient lands.
  • If intake runs on a different domain from your site, turn on cross-domain linking in the Conversion Linker on your marketing site’s container (the page the link starts from), listing both domains.

Turn off automatic data collection

Required before you go live. Karpa’s events carry no patient details, but Meta’s and Google’s tags can collect page content on their own, and on an intake form that content is the patient’s answers. In a test on a Karpa intake, Meta’s automatic events logged every button click with its text, for example the answer “Never / almost never” to a health question, together with the page address, IP address and browser.

  • Meta: the base Pixel code must call fbq('set', 'autoConfig', false, 'YOUR_PIXEL_ID'); before fbq('init', …). The template does this already. With it, Meta receives only the events your tags send.

  • Google Ads: leave enhanced conversions off when you create conversion actions (see Google Ads). Then, in GTM, change two settings that Google switches on by default as soon as the container has a Google tag. Find them in GTM Preview (Tag Assistant → your container → Tag Settings) or from the Google tag’s settings:

    • Allow user-provided data capabilities: off. When on, it scans the page for email addresses, phone numbers, names and addresses.
    • Manage automatic event detection: switch every option off (page views on browser history change, scrolls, outbound clicks, form interactions, video engagement, file downloads). Karpa’s events are your conversions; these add page addresses and form activity from the intake.

    Publish the container after changing them.

Check it with Meta Test Events (see Check it works): no SubscribedButtonClick rows should appear.

Meta’s Health and wellness restrictions

Meta may classify a telehealth data source or dataset (your Pixel) as Health and wellness and then restrict which events and parameters it accepts, or stop you optimizing for lower-funnel events such as SubmitApplication. Meta makes this call for your dataset; Karpa cannot change it.

To lower the risk:

  • Never put the Program or step into an event name. Use the standard events above, not custom names like weight_loss_checkout or medical_history_viewed.
  • Page addresses reveal the Program. Intake addresses look like /weight-loss/questionnaire, and your Pixel sends the page address with every event. Meta may treat that as health information, so keep the base Pixel on your marketing site and limit what fires on intake pages.
  • Check Events Manager for restriction notices after you go live.

Google has a similar rule: under its personalized advertising policy, health is a sensitive category, so you can’t build remarketing audiences from your intake visitors. Conversion tracking itself is not affected.

Changes to these events

Your tags depend on these event names, so Karpa changes them only in ways that can’t break them:

  • Within version 1, events and fields are only ever added. An existing event is never renamed, removed or made to fire at a different moment without a new version (v2) and advance notice.
  • New events and fields are listed below as they ship.
Date Change Do you need to act?
Next release Lab Order pages push lab_order_started, lab_order_checkout_view (InitiateCheckout) and lab_order_purchase (Purchase). Only if you want Lab Order conversions: add triggers and tags for them
2026-10-10 Follow-up and renewal checkouts no longer push intake_payment_authorized. Every push gains an event_id. No. If your conversions dropped after this date, renewals no longer count as new patients. Pass event_id to your tags to de-duplicate
2026-08-09 intake_purchase was renamed intake_payment_authorized (it is a card authorization, not a charge). This broke triggers listening for the old name. Yes, if any trigger still listens for intake_purchase: change it to intake_payment_authorized, reported as SubmitApplication