Rage Clicks Webhook → Discord
Receive PostHog rage click events and forward them to Discord with
human-readable alerts.

1. Set up Discord Webhook
- In your Discord server, go to Server Settings → Integrations → Webhooks
- Click New Webhook and copy the webhook URL
- Add it to this val's environment variables as
DISCORD_WEBHOOK_URL
2. Configure PostHog Webhook
- In PostHog, go to Data Pipelines → Destinations → Create Destination
- Select Webhook as the destination type
- Enter this val's endpoint URL:
https://valdottown--rage-clicks.web.val.run
- Set up a filter for the
$rageclick event
When PostHog detects a rage click, it sends a webhook to this val containing:
- The element that was clicked (as a complex
elements_chain string)
- The page URL
- User/session information
- Browser/device details
- Geo location
This val:
- Parses the
elements_chain into a human-readable description (e.g.,
"Save Changes" button instead of raw CSS selectors)
- Formats a Discord embed with all relevant context
- Sends an alert to your Discord channel
The alert includes:
- 🖱️ Clicked Element: What the user was clicking on
- 📍 Page: The URL where it happened
- 🌍 Location: User's geographic location
- 💻 Device: Browser and OS info
- 📱 Screen: Viewport dimensions
- 👤 User ID: Identified or anonymous user
- 🚪 Session Entry: Where the user started (if different)
Run shell.ts to send a test rage click event to Discord. It includes several
sample scenarios you can uncomment:
const eventToSend = sampleRageClickEvent;
- main.ts - HTTP handler that receives webhooks and sends Discord alerts
- shell.ts - Test script with sample rage click events
- README.md - This file