What this API does
The Plausible Analytics API provides developers with access to vital metrics such as page views, unique visitors, referrer sources, and conversion goals. It enables seamless integration of these metrics into custom dashboards or applications while maintaining user privacy.
How it works
Developers can send HTTP requests to retrieve analytics data. The API supports fetching data in JSON format, allowing compatibility with various programming languages. Metrics such as page views and unique visitors are easily accessible through defined endpoints, making it straightforward to integrate into applications.
Authentication
The API supports authentication via API keys. Developers must include their API key in request headers to authenticate requests and access data.
Example usage
/api/v1/stats- Retrieves overall statistics, including total page views and unique visitors./api/v1/stats/{siteId}- Fetches metrics specific to the given site ID./api/v1/events- Accesses event tracking data such as conversions and referrer sources.
Limits
Rate limits are not explicitly documented. Developers should monitor API usage to ensure optimal performance and avoid potential throttling.
Ideal use cases
- Integrating real-time analytics into custom web applications.
- Building dashboards to visualize website metrics for clients.
- Tracking marketing campaign conversions and referral sources.
- Enhancing website performance by analyzing user interactions.