๐ Real-time Event NotificationsWebhooks allow Trackpilots to send real-time event data to your application whenever an event occurs.
๐ Overview
Webhooks enable your system to automatically receive event notifications from Trackpilots.Whenever a selected event occurs, Trackpilots sends a POST request to your configured webhook URL with the event payload. You can create and manage webhooks from the Developer Tools section in the Trackpilots dashboard.
โ Create a Webhook
Follow the steps below to create a new webhook:- Open Developer Tools in your Trackpilots dashboard.
- Click Webhooks in the menu.
๐ Direct link: https://app.trackpilots.com/developer-tools/webhooks - Click the Create Webhook button in the top-right corner.
- Fill in the details:
- ๐ท๏ธ Webhook Name โ Friendly name for identification
- ๐ Webhook URL โ The endpoint where events will be delivered
- Select the events you want to receive.
- Click Create.
๐ก Supported Events
๐ All Events
- Enable this option to receive all available Trackpilots events.
๐ป Desktop Events
Currently supported desktop tracking events:- ๐ธ
desktop.screenshot_tracking.captured - ๐ง
desktop.app_tracking.captured - ๐
desktop.activity_tracking.captured
โ๏ธ Webhook Delivery Behavior
- Trackpilots sends a POST request to your webhook URL
- Payload is delivered in JSON format
- Your server must return HTTP 2xx to confirm successful delivery
๐งโ๐ป Sample Webhook Receiver (Node.js + Express)
Below is a secure Express.js webhook receiver with HMAC signature verification.๐ Signature Verification Flow
Trackpilots secures webhooks using HMAC SHA256 signature validation to ensure authenticity and integrity.๐ค Trackpilots Sends
Each webhook request includes:- ๐งพ x-webhook-signature
- โฑ๏ธ x-webhook-timestamp
- ๐ฆ Raw JSON request body
๐งฎ Your Server Generates
Your server must compute the expected signature:HMAC_SHA256(timestamp + โ.โ + body, WEBHOOK_SECRET)
โ Signature Match Rule
If the computed signature matches the received signature: ๐ The webhook request is trusted and verified. This ensures the request is authentic and not tampered with.๐งช Test Webhooks Locally
You can test Trackpilots webhooks in your local environment using ngrok.๐ Start ngrok
ngrok http 3000This exposes your local webhook server to the internet.
๐ Set Webhook URL in Trackpilots
Use the generated ngrok public URL:https://YOUR_NGROK_URL/webhooks/trackpilotsPaste this URL into the Webhook URL field in the Trackpilots dashboard.
โ ๏ธ Security Best Practices
โ ๏ธ Ensure High AvailabilityMake sure your webhook endpoint is publicly accessible and highly available to avoid missed events.
- Validate incoming webhook payloads.
- Log webhook requests for debugging and auditing.
- Handle duplicate events gracefully.
- Secure your endpoint using signature validation (recommended).
๐ก๏ธ Always verify webhook signatures:
Never trust incoming webhook requests without validation.
๐ Recommended Practices
- Store webhook secrets in environment variables
- Reject requests with invalid signatures
- Log webhook events for auditing and debugging
- Always use HTTPS
- Apply IP allowlisting for enterprise-grade security
โ Summary
Webhooks enable real-time integrations with Trackpilots, including:- โ๏ธ Automation workflows
- ๐ Analytics pipelines
- ๐จ Alert systems
- ๐ง Productivity monitoring integrations
๐ More Events Coming SoonAdditional event types and webhook features will be added soon.
For custom webhook requirements, contact team@trackpilots.com.
For custom webhook requirements, contact team@trackpilots.com.
