Discord
Datafly Signal posts real-time notifications to a Discord channel using an Incoming Webhook. When a notify-worthy event happens on your site — an order, a sign-up, a new lead — Signal sends a message to your channel server-to-server. There is no client-side script and no bot to host.
Discord webhooks are a notification surface, not an advertising or identity API. Signal does not send hashed PII or consent signals to Discord — it sends a human-readable message describing the event. Keep low-volume, high-signal events mapped (orders, sign-ups, leads) so the channel stays useful.
Prerequisites
You need Manage Webhooks permission on the Discord server (guild) where you want notifications to land.
Open the channel’s webhook settings
In Discord, go to the channel you want to post into, then Edit Channel (the gear icon) > Integrations > Webhooks. You can also reach this from Server Settings > Integrations > Webhooks.
Create a webhook
Click New Webhook. Give it a name (e.g. “Datafly Signal”) and, optionally, an avatar. Confirm it is pointed at the correct channel.
Copy the Webhook URL
Click Copy Webhook URL. The URL looks like:
https://discord.com/api/webhooks/123456789012345678/aBcDeFgHiJkLmNoPqRsTuVwXyZ...This URL contains the webhook token. Anyone who has it can post to your channel. Treat it as a secret — store it only in Signal, and rotate it (delete and recreate the webhook) if it leaks.
Configure in Signal
Configuration Fields
| Field | Required | Description |
|---|---|---|
webhook_url | Yes | The full Incoming Webhook URL you copied from Discord. Stored as a secret. |
Management UI Setup
- Go to Integrations > Add Integration > Discord.
- Choose the Default preset.
- Paste your
webhook_url. - Click Save.
The Default preset notifies on Order Completed, Signed Up, and Lead Generated. All other events (page views, product views, etc.) are dropped so they don’t flood the channel. To notify on more events, edit the integration’s Field Mappings in the Management UI.
API Endpoint
Signal delivers each event with the Discord Execute Webhook endpoint:
POST https://discord.com/api/webhooks/{webhook.id}/{webhook.token}The webhook id and token come from the webhook_url you configured — Signal posts the JSON body directly to that URL. Authorization is the token in the URL; there is no separate API key or header. A successful send returns 204 No Content.
Identity Signals
Discord is a channel notification surface, so Signal does not send user identity signals (no email, phone, IP, or hashed PII) and does not apply consent gating. Only the event details you map into the message and embed are sent. If you want to include a user reference (for example an order’s customer name), map it explicitly into an embed field in your blueprint — and only do so if your channel’s audience is permitted to see it.
Event Mapping
Default preset
| Signal event | Discord message |
|---|---|
Order Completed | ”🛒 New order {order_id} — {revenue} {currency}” + embed with order details |
Signed Up | ”🎉 New sign-up via {method}” + embed |
Lead Generated | ”📥 New lead — {value} {currency}” + embed |
page (and all others) | Dropped — not sent to the channel |
Each event builds a plain-text content message plus a rich embed (a card with a title, colour, and detail fields). Discord limits content to 2000 characters and the combined text across all embeds to 6000 characters.
Example: Order notification
Datafly.js call:
datafly.track("Order Completed", {
order_id: "ORD-001",
revenue: 129.99,
currency: "GBP"
});Discord payload sent by Signal:
{
"username": "Datafly Signal",
"content": "🛒 New order **ORD-001** — 129.99 GBP",
"embeds": [
{
"title": "Order Completed",
"color": 5814783,
"fields": [
{ "name": "Order ID", "value": "ORD-001" },
{ "name": "Revenue", "value": "129.99" },
{ "name": "Currency", "value": "GBP" }
]
}
]
}This appears in the channel as a message from “Datafly Signal” with a coloured embed card listing the order details.
Testing
- Create a throwaway webhook in a private test channel and paste its URL into a test Signal integration.
- Trigger an
Order Completedevent on your site (or replay one from Signal’s event debugger). - Confirm the message appears in the test channel within a second or two.
- Inspect the embed fields to verify your mappings produced the values you expect.
- When satisfied, point the integration at the real channel’s webhook URL.
Troubleshooting
| Problem | Solution |
|---|---|
| Nothing arrives in the channel | Confirm the webhook_url is complete and unedited. Check the webhook still exists in Discord (Channel > Integrations > Webhooks). |
401 / 403 / 404 errors | The webhook was deleted or its token rotated. Recreate the webhook in Discord and update webhook_url in Signal. |
400 errors | The message body was empty or exceeded a limit (content > 2000 chars, or embeds > 6000 chars combined). Shorten the mapped content or trim embed fields. |
| Channel is too noisy | Make sure only high-signal events are enabled. The Default preset drops page views and product events via defaults.action: drop; do not enable page. |
Occasional delays / 429 | Discord rate-limits webhooks (~5 messages every 2 seconds). Signal throttles delivery and retries on 429. If you genuinely need higher volume, split across multiple webhooks/channels. |