Simple Setup

Kajabi Checkout Email Tracking

Fix Hyros email tracking on Kajabi checkout pages with this simple script.

You've completed 0 training pages

What You Need To Do

Kajabi checkout pages use Shadow DOM, which blocks Hyros from reading the email field. This script fixes that by creating a bridge that Hyros can access.

📍 Where to add the script:
Kajabi → Settings → Global Checkout Settings → Scripts in Head Section

Copy & Paste This Script

📋

Step 1: Copy the script below

Click anywhere in the box to select all, then copy

<script>
(function () {
  var MAX_RETRIES = 40;
  var retryCount = 0;

  function init() {
    var emailComponent = document.querySelector('pds-input[component-id="email"]');
    if (!emailComponent) {
      retryCount++;
      if (retryCount < MAX_RETRIES) { setTimeout(init, 500); }
      return;
    }

    var bridge = document.createElement("input");
    bridge.type = "email";
    bridge.name = "email";
    bridge.id = "hyros-email-bridge";
    bridge.style.cssText = 'position:absolute;left:-9999px;top:-9999px;opacity:0;pointer-events:none;';
    document.body.appendChild(bridge);

    function syncEmail(value) {
      if (value && value !== bridge.value) {
        bridge.value = value;
        bridge.dispatchEvent(new Event("input", { bubbles: true }));
        bridge.dispatchEvent(new Event("change", { bubbles: true }));
      }
    }

    var observer = new MutationObserver(function (mutations) {
      for (var i = 0; i < mutations.length; i++) {
        if (mutations[i].attributeName === "value") {
          syncEmail(emailComponent.getAttribute("value"));
        }
      }
    });
    observer.observe(emailComponent, { attributes: true, attributeFilter: ["value"] });

    var shadowRoot = emailComponent.shadowRoot;
    if (shadowRoot) {
      var shadowInput = shadowRoot.querySelector("input");
      if (shadowInput) {
        shadowInput.addEventListener("input", function () { syncEmail(shadowInput.value); });
        shadowInput.addEventListener("change", function () { syncEmail(shadowInput.value); });
      }
    }

    document.addEventListener("submit", function () {
      var v = emailComponent.getAttribute("value") || "";
      if (!v && shadowRoot) {
        var inp = shadowRoot.querySelector("input");
        if (inp) v = inp.value;
      }
      syncEmail(v);
    }, true);

    var iv = emailComponent.getAttribute("value");
    if (iv) { syncEmail(iv); }
  }

  if (document.readyState === "loading") {
    document.addEventListener("DOMContentLoaded", init);
  } else { init(); }
})();
</script>
🔗

Step 2: Add Hyros Universal Script

Right after the script above, add your Hyros Universal Script (the standard tracking script you use everywhere)

Both scripts need to be in the same "Scripts in Head Section" area

Step 3: Save and Test

Go to Kajabi → Settings → Global Checkout Settings → scroll to "Scripts in Head Section"

Paste both scripts, save, and test a checkout. Hyros should now capture the email!

📖

Complete Implementation Guide

Get the full step-by-step documentation with detailed code examples, troubleshooting tips, and screenshots.

View Full Guide

Questions about this implementation? Contact the development team.