Overview
Custom events allow you to track specific user actions beyond pageviews, such as button clicks, form submissions, file downloads, and purchases. Custom events are sent to the same Event Ingestion endpoint as pageviews.Sending Custom Events
Custom events use the same/api/event endpoint as pageviews, but with a custom event name.
Event Names
Custom event name (also accepts
name field)Requirements:- Maximum length: 120 characters
- Cannot be empty or whitespace
- Cannot be
engagement(reserved for internal use)
SignupPurchaseDownloadOutbound Link: ClickFile DownloadForm: Submission404
Custom Properties
Attach additional metadata to your custom events using custom properties (props).Custom properties object (also accepts
props, m, or meta fields)Constraints:- Maximum 30 properties per event
- Property keys: maximum 300 bytes
- Property values: maximum 2000 bytes
- Both keys and values must be strings
System Events
Plausible provides several built-in system events that can be automatically tracked:Outbound Link Clicks
Event name:Outbound Link: Click
Tracks clicks on external links leaving your domain.
File Downloads
Event name:File Download
Tracks downloads of common file types (PDF, ZIP, etc.).
Form Submissions
Event name:Form: Submission
Tracks form submission events.
404 Pages
Event name:404
Tracks page not found errors. Event names can be integers or strings.
Examples
Basic Custom Event
Custom Event with Properties
Button Click Tracking
File Download Tracking
Event Processing
When a custom event is received:- Validation - Event name and properties are validated
- User Identification - User ID is generated from IP, user agent, and domain
- Geolocation - Country, region, and city are detected from IP
- Device Detection - Browser, OS, and screen size are parsed from user agent
- Source Attribution - Referrer and UTM parameters are processed
- Shield Rules - Event is checked against IP, country, page, and hostname filters
- Session Management - Event is associated with or creates a new session
- Buffering - Event is buffered and written to ClickHouse
Custom Event Goals
To track conversions for custom events, you need to create a goal in your Plausible dashboard or via the Goals API. See the Create Goal endpoint for details on setting up custom event goals.Best Practices
- Use descriptive event names - Make event names clear and specific (
Signupinstead ofclick) - Keep property keys short - Use concise keys to save space (
planinstead ofsubscription_plan_type) - Use consistent naming - Maintain a naming convention across your events
- Limit property count - Only track properties you’ll actually use for analysis
- String values only - Convert numbers and booleans to strings for properties
- Test events first - Verify events appear in your dashboard before deploying
Related Endpoints
- Event Ingestion - Full event ingestion API reference
- Create Goal - Set up goals to track custom event conversions
- List Goals - View all goals configured for your site