Overview
The Plausible Events API allows you to track events from server-side applications, mobile apps, or any environment where the JavaScript tracker cannot be used. Events are sent as HTTP POST requests to the Plausible API endpoint.API Endpoint
All events are sent to:Authentication
The Events API does not require authentication for basic event tracking. Events are associated with your site based on thedomain field in the request payload.
Request Format
Events are sent as JSON POST requests with the following structure:Headers
The
User-Agent header is used to detect the visitor’s browser and operating system. The X-Forwarded-For header can be used to pass the visitor’s IP address when making requests from a server.Payload Structure
The JSON payload contains event data with shortened field names for efficiency:Payload Fields
Event name. Use
"pageview" for pageviews or any custom event name.URL of the page where the event occurred. Must include protocol and domain.
Domain of your site as configured in Plausible.
Referrer URL. The page that linked to the current page.
Tracker script version for debugging purposes.
Custom properties for the event. See custom properties documentation.
Whether the event is interactive. Non-interactive events don’t affect bounce rate.
Revenue information for ecommerce tracking. See revenue tracking.
Set to
1 for hash-based routing. Includes the URL hash in pageview tracking.Response Codes
The API returns the following HTTP status codes:| Status Code | Description |
|---|---|
202 | Event accepted and queued for processing |
400 | Bad request - invalid payload or validation error |
429 | Too many requests - rate limit exceeded |
Success Response
Error Response
Examples
Pageview Event
Track a simple pageview:Custom Event with Properties
Track a custom event with additional metadata:Revenue Tracking
Track an event with revenue information:Revenue tracking requires the appropriate plan. See ecommerce revenue tracking for more details.
Non-Interactive Event
Track an event that shouldn’t affect bounce rate:Event Processing
When an event is received, Plausible processes it through an ingestion pipeline that:- Validates the request payload
- Checks for bot traffic and spam referrers
- Applies site-specific filters (IP blocklist, country blocklist, etc.)
- Extracts geolocation data from the IP address
- Parses the User-Agent for browser and OS information
- Associates the event with a visitor session
- Buffers the event for batch insertion into the database
Event Validation
Events are validated against the following rules:domainmust match a configured site in your Plausible accountname(event name) cannot be blankurlmust be a valid URL with protocol- Custom property keys and values must be strings
- Revenue
amountmust be numeric - Revenue
currencymust be a valid ISO 4217 currency code
Drop Reasons
Events may be dropped for various reasons:- Bot traffic detected via User-Agent
- Spam referrer blocklist match
- Data center or threat IP address
- Site-specific shield rules (IP blocklist, country blocklist, page blocklist)
- Hostname not in site’s allowlist
- Invalid event data
Rate Limits
The Events API has rate limits to prevent abuse:- 600 events per minute per domain
- Burst capacity of 120 events
Best Practices
Set Accurate User-Agent
Always send a realistic
User-Agent header to ensure accurate browser and OS tracking.Forward Client IP
Use
X-Forwarded-For header to pass the actual visitor IP when making server-side requests.Don't Track Sensitive Data
Never send personally identifiable information (PII) in URLs or custom properties.
Next Steps
Custom Events
Learn about custom event tracking
Custom Properties
Add metadata to your events