Quickstart

Get Komo running in your environment. Pick your platform below — each guide gets you from zero to a working integration.

Prerequisites (all platforms)

  • A Komo Workspace with at least one Site (Hub) created
  • Access to portal.komo.digital
  • Your Hub URL (e.g. my-awesome-hub.komo.site)
  • At least one Card ID — find this in the Komo Portal under card settings
1

Add the Embed Script

Paste this bootstrapper into your HTML. Replace KOMO_HUB_URL with your Hub domain (e.g. my-awesome-hub.komo.site).

<script>
  (function (n, r, t, c, u, e, f) {
    n[u] =
      n[u] ||
      (function (q) {
        return new Proxy(q, {
          get(y, s) {
            return s === 'q'
              ? y[s] || []
              : function (...B) {
                  (n[u].q = n[u].q || []).push([s, ...B]);
                };
          }
        });
      })(});
    e = r.createElement(t);
    f = r.getElementsByTagName(t)[0];
    e.async = 1;
    e.src = c;
    f.parentNode.insertBefore(e, f);
  })(
    window,
    document,
    'script',
    'https://KOMO_HUB_URL/assets/embed/embed.js',
    'komoEmbed'
  );
</script>

This creates a komoEmbed global. Calls are queued until the script loads, so you can use it immediately.

2

Embed a Card Cover

Renders the card's cover image inline. Clicking opens the full experience in a modal.

<div
  data-komo-embed-card-cover
  data-komo-embed='{"cardId":"CARD_ID","styles":{"embedStyle":"ImageButton","embedWidth":"unset"}}' 
></div>
3

Or Use a Card Trigger

Turn any element into a card opener — no visual changes, just behavior.

<button data-komo-embed-card-trigger="CARD_ID">
  Play the Trivia Challenge!
</button>
4

Listen for Events

React to user interactions — form submissions, gameplay, prizes.

const unsubscribe = komoEmbed.listenToKomoEvents(
  function(event) {
    // event: { eventName: string, eventData: any }
    console.log(event.eventName, event.eventData);
  }
);
5

Prefill Forms (Optional)

If you know the user's details, prefill so they don't re-enter them.

komoEmbed.setFormPrefillValues({
  first_name: 'Jane',
  last_name: 'Smith',
  email: 'jane@example.com'
});

See It Working

Live card cover and trigger — click either to open a real Komo experience.

Card Cover
Card Trigger

Full reference: Web Embed SDK docs — covers programmatic API, query parameters, authentication, extension data, and more.

Next Steps

You've got a working integration. Go deeper: