Alerts and webhooks

GTM Hero tells you the moment a prospect scans their gift or reads their page: by email, in Slack, or with a JSON webhook you can wire into your CRM or automation tool.

Alerts come with every account page, whether it sits behind the QR on a gift or goes out in an email, and the webhook can log each one on the contact in HubSpot or Salesforce.

What triggers an alert

EventFires when
viewSomeone opens an account page
qr_scanSomeone scans the QR code on their gift
cta_clickSomeone clicks a button on the page, such as the one that books a call
page.readyA page made through the API is written and live, so its link can be sent (webhook only)
page.failedA page made through the API couldn’t be written (webhook only)

Email and Slack alerts are throttled per page, so a busy page doesn't fill your inbox: views alert at most once every 30 minutes, scans and clicks at most once every 5 minutes, and a QR scan replaces the "is viewing" alert that would follow it. The events webhook gets every event, up to 60 deliveries a minute per company, and leaves the filtering to whatever receives it.

Email alerts

On by default for every rep, sent to the address you sign in with, for pages you created. Turn them off in the app under Settings → Your Profile → Notifications.

Slack alerts

  1. In Slack: Apps → Incoming Webhooks → Add to Slack, pick a channel, and copy the webhook URL (https://hooks.slack.com/services/…).
  2. Paste it in one of two places: Your Profile for your own channel (used for pages you created), or Organization settings (admins) as the fallback for any rep without a webhook of their own.

Events webhook (CRM, Zapier or your own endpoint)

An admin sets an Events webhook URL under Settings → Organization → Notifications & integrations. Every page event is delivered as:

POST <your URL>
Content-Type: application/json
User-Agent: GTMHero-Webhook/1.0
X-GTMHero-Timestamp: 1751879643
X-GTMHero-Signature-V2: sha256=<hex hmac over "<timestamp>.<body>">
X-GTMHero-Signature: sha256=<hex hmac over body>   (legacy, will be removed)

{
  "event": "qr_scan",
  "occurred_at": "2026-07-07T09:14:03.120000+00:00",
  "variant": {
    "id": "6f0c…",
    "title": "Acme Ltd · Jane Smith",
    "url": "https://app.gtmhero.co.uk/v/acme-jane-x1"
  },
  "target": { "id": "9a1b…", "company_name": "Acme Ltd", "website": "https://acme.com" },
  "contact": { "id": "c2d3…", "name": "Jane Smith", "role": "VP Sales", "email": "jane@example.com" },
  "rep": { "uid": "u-…", "name": "Riley Rep", "email": "riley@example.com" },
  "payload": { "label": "Book a demo" }
}

contact is null for pages written for a company with no named person. payload carries the event's extras: the label of the button clicked, the QR code scanned. It only ever holds label, code, source and href, as short strings.

Your endpoint should return a 2xx quickly. Each delivery is tried once, with a 6-second timeout and no retries, so a missed event isn't sent again. The full history of every page is always in GTM Hero's analytics.

Verifying the signature

When you save a webhook URL, GTM Hero generates a signing secret, shown on the same settings card. Each request carries a unix timestamp in X-GTMHero-Timestamp and, in X-GTMHero-Signature-V2, an HMAC-SHA256 over the string "<timestamp>.<raw body>". Check the timestamp is recent (5 minutes is a sensible tolerance), then verify the signature:

# Python (FastAPI / Flask)
import hashlib, hmac, time

def verify(secret: str, body: bytes, timestamp: str, header: str, tolerance: int = 300) -> bool:
    try:
        if abs(time.time() - int(timestamp)) > tolerance:
            return False
    except (TypeError, ValueError):
        return False
    msg = timestamp.encode() + b"." + body
    expected = "sha256=" + hmac.new(secret.encode(), msg, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, header or "")
// Node
const crypto = require("crypto");

function verify(secret, rawBody, timestamp, header, tolerance = 300) {
  if (Math.abs(Date.now() / 1000 - Number(timestamp)) > tolerance) return false;
  const expected = "sha256=" + crypto.createHmac("sha256", secret)
    .update(timestamp + ".").update(rawBody).digest("hex");
  const a = Buffer.from(expected), b = Buffer.from(header || "");
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}

Compute the HMAC over the raw request body bytes. Re-serialising the parsed JSON changes the key order and the signature won't match. Reject requests with a missing or invalid signature or a stale timestamp. The older X-GTMHero-Signature header (an HMAC over the body alone) is still sent for now so existing receivers keep working; use V2 for anything new.

To rotate the secret, clear the webhook URL, save, then set it again. A new secret is generated.

Security notes

  • Webhook URLs must be public http(s) endpoints. GTM Hero refuses to post to private, loopback or cloud-metadata addresses.
  • The payload includes contact details (name, role, email). Only owners and admins can set or read the webhook settings, so point it somewhere you trust.
  • Alert emails and Slack messages escape everything a visitor could have typed, and the public event endpoint is rate-limited per IP.

Questions, or need another event? Ask us.