Formatting Event Descriptions
Use bold, italics, links, and code in event descriptions.
Formatting Event Descriptions
Send Markdown in an event's description to make updates easier to read in the Feed and event details dialog. There is no setting to enable it. Descriptions support the following formatting:
- Bold: wrap text in two asterisks or underscores, such as
**important**. - Italics: wrap text in one asterisk or underscore, such as
*emphasis*. - Inline code: wrap a name such as order_id in backticks.
- Links: write
[View order](https://example.com/orders/123).
For a stack trace or multiline example, put three backticks on their own lines around the code. You can add a language name after the opening fence, but code blocks do not have syntax highlighting.
{"description":"Payment *failed* for **order 123**.\n\n```text\nError: card declined\n at chargeCustomer (billing.ts:42)\n```\n\n[View order](https://example.com/orders/123)"} Send a formatted event
Send the description through the events API, an incoming webhook, or the browser SDK. For example, from the browser after initializing the SDK:
import { init, track } from '@getbutters/js'
init({ key: 'pk_YOUR_PUBLISHABLE_KEY' })
await track('billing', 'Payment failed', {
description: 'Payment *failed* for **order 123**. Check `payment_id`.',
}) Open the project's Feed and find Payment failed. The description should show italic emphasis, a bold order number, and inline code. Click the event title to view the same formatting in its details dialog.
When sending multiline descriptions in JSON, encode line breaks as \n, or use JSON.stringify() to encode the string for you. Code contents stay literal; Markdown inside backticks is not formatted.
Troubleshooting
- HTML appears as text: HTML is escaped. Use the supported Markdown syntax instead of HTML tags.
- A link is not clickable: use an
httporhttpsURL. Unsafe schemes such asjavascript:anddata:do not become links. - A code block is not formatted: put matching three-backtick fences on separate lines, with a newline after the opening fence.
- Formatting looks different in a notification: this guide describes the dashboard. Notification destinations apply their own formatting.
- The API response still contains Markdown: descriptions are stored and returned as their original text; formatting happens in the dashboard.
Headings, lists, tables, and images are not part of this description format.
See API Reference for event payloads, Webhooks for sending events from a URL, and Event Details and Comments for inspecting an event.