Embed & API

Everything here is live in this deployment (https://spin.igamingcareer.com). Swap in your custom domain (e.g. spin.igamingcareer.com) once connected.

Copy-paste iframe

No SDK, login or third-party cookies required.

HTML
<iframe
  src="https://spin.igamingcareer.com/embed/igc-malta-2026?mode=default"
  title="Spin & Connect"
  style="width:100%;height:640px;border:0;"
  allow="clipboard-write; vibrate"
  loading="lazy"
></iframe>

Embed modes

  • default — full branded player.
  • compact — smaller wheel, no subtitle or footer (sidebars, ≥320px).
  • fullscreen — fills the viewport height.
  • transparent — no background; inherits the host page.

Flexible URL options

These options affect only this iframe; they never edit the saved event. Separate multiple tags with commas. Text and colors must be URL-encoded when necessary. Invalid values fall back safely.

ParameterValues / behavior
tagsComma-separated tags; questions matching any tag are included, e.g. networking,icebreaker.
categoryCategory ID or exact label (case-insensitive). Can be combined with tags.
slicesVisible wheel slices, clamped to 6–12. The larger matching question pool stays available.
bonusoff disables gifts in this embed. on preserves the organizer's setting; it cannot enable a disabled campaign.
prizeNameDisplay-only gift label, up to 60 characters. Prize odds, inventory and claims remain server-controlled.
titleEvent/header and intro title, up to 60 characters.
spinBtnCenter spin button label, up to 14 characters.
ctaKicker above the intro title, e.g. Ready to connect?.
endingCtaText below the question. Uses the event's saved ending URL when one exists; otherwise displays as text.
hideHeader1 hides the event title/logo. Accessibility and playback controls remain available.
hideFooter1 hides sponsors, credit and the privacy link.
hideSound1 hides the sound toggle.
themepurple, neon, gold, minimal or teal (full preset IDs also work).
accentHex accent color such as %23C9F64A. Other CSS is not accepted.
sound1 enables sound for interactions; 0 starts muted. Browsers still require a tap before audio plays.
spinDurationSpin duration in seconds, clamped to 2.5–4.
autoResetSeconds before returning to the next guest, clamped to 5–600; 0 disables result auto-reset. Gift celebrations are never cut short.
Customized iframe
<iframe
  src="https://spin.igamingcareer.com/embed/igc-malta-2026?mode=transparent&tags=networking,icebreaker&slices=6&bonus=off&title=Malta%20VIP%20Wheel&spinBtn=PLAY&cta=Ready%20to%20connect%3F&endingCta=Visit%20our%20booth&hideHeader=1&hideFooter=1&theme=teal&accent=%23C9F64A&sound=1&spinDuration=3.5&autoReset=15"
  title="Spin & Connect"
  style="width:100%;height:680px;border:0;background:transparent"
  allow="clipboard-write; vibrate"
  loading="lazy"
  allowtransparency="true"
></iframe>

If the filters match no questions, the embed shows a clear empty state instead of spinning the unfiltered pool.

Server headers (important)

/embed/:slug responds with Content-Security-Policy: frame-ancestors 'self' <allowed origins> built from the event's allowlist (or * if none). Framing permission is enforced by HTTP headers and cannot be bypassed or granted from frontend code. If your hosting/CDN adds X-Frame-Options, remove it for /embed/* or embedding will be blocked. Verify on your deployed domain with a real cross-origin page.

postMessage protocol

Messages are objects { type, version: 1, eventSlug, payload? }. Outbound messages are posted only to allowlisted origins (or * when the allowlist is empty — payloads contain only public question text). Inbound messages are accepted only from the parent window with an exact allowlisted origin.

typedirectionpayload
igc-spin:ready→ parent{ segments }
igc-spin:resize→ parent{ height }
igc-spin:started→ parent{ manual }
igc-spin:completed→ parent{ category, question, questionId, manual }
igc-spin:question-shown→ parent{ question, questionId }
igc-spin:reset↔ both— (parent may send to reset for next guest)
igc-spin:error→ parent{ message }

Optional JS SDK

HTML + SDK
<div id="igc-spin"></div>
<script src="https://spin.igamingcareer.com/sdk/igc-spin.js"></script>
<script>
  IGCSpin.mount("#igc-spin", {
    eventSlug: "igc-malta-2026",
    origin: "https://spin.igamingcareer.com",
    mode: "default",
    onSpin: (payload) => console.log("spin completed", payload),
  });
</script>

Next.js client component

SpinConnect.tsx
"use client";
// Next.js (App Router) client component — no SDK required.
import { useEffect, useRef, useState } from "react";

const SPIN_ORIGIN = "https://spin.igamingcareer.com";

export function SpinConnect({ slug = "igc-malta-2026", mode = "default" }: { slug?: string; mode?: string }) {
  const ref = useRef<HTMLIFrameElement>(null);
  const [height, setHeight] = useState(640);
  useEffect(() => {
    const onMessage = (ev: MessageEvent) => {
      if (ev.origin !== SPIN_ORIGIN || ev.source !== ref.current?.contentWindow) return;
      const d = ev.data;
      if (!d || d.version !== 1 || typeof d.type !== "string" || !d.type.startsWith("igc-spin:")) return;
      if (d.type === "igc-spin:resize" && d.payload?.height) setHeight(d.payload.height);
      if (d.type === "igc-spin:completed") {
        // e.g. window.dataLayer?.push({ event: "spin_completed" }) — only after consent
      }
    };
    window.addEventListener("message", onMessage);
    return () => window.removeEventListener("message", onMessage);
  }, []);
  return (
    <iframe ref={ref} src={`${SPIN_ORIGIN}/embed/${slug}?mode=${mode}`} title="Spin & Connect"
      style={{ width: "100%", height, border: 0 }} allow="clipboard-write; vibrate" loading="lazy" />
  );
}

REST API v1

Base: https://spin.igamingcareer.com/api/public/v1. Management endpoints need Authorization: Bearer igc_live_… (create keys in Dashboard → Integrations; only a SHA-256 hash is stored). Rate limited per key/IP (best-effort per edge instance).

  • GET /events/:slug — public config of a published event
  • POST /events/:slug/track — anonymous batched activity (used by the player)
  • GET /manage/events — scope events:read
  • GET /manage/events/:id/questions — scope questions:read
  • POST /manage/events/:id/questions — scope questions:write
  • GET /manage/events/:id/metrics — scope metrics:read (aggregates; sessions ≠ people)

Webhooks

Events: spin.completed, question.shown, event.viewed — sent only when analytics are enabled for the event. Each POST carries IGC-Signature: t=<unix>,v1=<hex> where v1 = HMAC-SHA256(secret, "t.body"), plus IGC-Delivery-Id for dedupe. Up to 3 attempts with backoff (0 s, 0.8 s, 2.5 s); then the delivery is marked dead and visible in the dashboard. Reject timestamps older than 5 minutes.

Node verify
import crypto from "node:crypto";
export function verifyIgcSignature(rawBody: string, header: string, secret: string) {
  const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
  if (Math.abs(Date.now() / 1000 - Number(parts.t)) > 300) return false; // replay window
  const expected = crypto.createHmac("sha256", secret).update(`${parts.t}.${rawBody}`).digest("hex");
  return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1 ?? ""));
}

Django / DRF / Wagtail

python
# Django / DRF — server-side proxy for metrics & event config (keeps the API key off the browser)
# settings.py
SPIN_API_BASE = "https://spin.igamingcareer.com/api/public/v1"
SPIN_API_KEY = os.environ["SPIN_API_KEY"]  # igc_live_..., scopes: events:read metrics:read

# views.py
import requests
from django.conf import settings
from django.core.cache import cache
from rest_framework.decorators import api_view, permission_classes
from rest_framework.permissions import IsAdminUser
from rest_framework.response import Response

@api_view(["GET"])
@permission_classes([IsAdminUser])
def spin_metrics(request, event_id):
    key = f"spin:metrics:{event_id}"
    data = cache.get(key)
    if data is None:
        r = requests.get(f"{settings.SPIN_API_BASE}/manage/events/{event_id}/metrics",
                         headers={"Authorization": f"Bearer {settings.SPIN_API_KEY}"}, timeout=5)
        r.raise_for_status()
        data = r.json()["data"]
        cache.set(key, data, 60)
    return Response(data)

# Webhook receiver — verify HMAC + timestamp (replay protection)
import hmac, hashlib, time
from django.http import HttpResponse, HttpResponseForbidden
from django.views.decorators.csrf import csrf_exempt

@csrf_exempt
def spin_webhook(request):
    sig = request.headers.get("IGC-Signature", "")
    parts = dict(p.split("=", 1) for p in sig.split(",") if "=" in p)
    t, v1 = parts.get("t", "0"), parts.get("v1", "")
    if abs(time.time() - int(t)) > 300:
        return HttpResponseForbidden("stale")
    expected = hmac.new(os.environ["SPIN_WEBHOOK_SECRET"].encode(), f"{t}.".encode() + request.body, hashlib.sha256).hexdigest()
    if not hmac.compare_digest(expected, v1):
        return HttpResponseForbidden("bad signature")
    # dedupe on request.headers["IGC-Delivery-Id"], then process
    return HttpResponse("ok")

# Wagtail: add the iframe snippet to a RawHTMLBlock or a custom StreamField block.

Local embed test

Open /embed-test.html. For a true cross-origin test, serve the public/ folder on another port (npx serve public -l 3000), open http://localhost:3000/embed-test.html?origin=https://spin.igamingcareer.com, and add http://localhost:3000 to the event's allowed origins.

Roadmap (not yet implemented)

  • Native connectors: Zapier/Make/n8n apps, HubSpot, Salesforce, Mailchimp, SendPulse (use webhooks today).
  • Consent-aware GA4/GTM/PostHog dispatch (today: forward igc-spin:completed yourself after consent).
  • Service-worker app-shell caching (today: loaded events keep working offline and the pack is cached per device).
  • Team invitations by email, queued webhook retries beyond the inline window, billing plans.