Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Plausible

Laravel Plausible Laravel Package

kilobyteno/laravel-plausible

A Laravel package for integrating Plausible Analytics into your app, with a simple API to track pageviews and custom events server-side without cookies. It keeps analytics privacy-friendly and easy to configure through Laravel's service container and config.

View on GitHub
Deep Wiki
Context7

A simple package for communicating with the Plausible API within Laravel

Frequently asked questions about Laravel Plausible
How do I install kilobyteno/laravel-plausible in a Laravel application?
Install it with Composer using composer require kilobyteno/laravel-plausible. Laravel's package auto-discovery registers the service provider, then you publish the package config and set your Plausible domain or self-hosted URL. Finally add the documented script or middleware injection point to your layout or HTTP stack and verify pageviews arrive in your Plausible dashboard.
Does this package support Laravel 13?
Yes, release 1.4.0 explicitly adds Laravel 13 support. That version is a minor release with no indicated breaking changes or deprecations. Always verify the package's Composer constraints against your application's PHP and Laravel versions before upgrading, since constraint-level support is not the same as a deeply proven test matrix.
Can I use it with a self-hosted Plausible instance instead of Plausible Cloud?
Yes, the package is designed to work with both Plausible Cloud and self-hosted deployments. You point the configuration at your own Plausible endpoint or domain instead of the default plausible.io host. Make sure your content security policy allows requests to that self-hosted domain.
Can I track custom events server-side with this package?
Yes, the package is built around a simple API for sending pageviews and custom events to Plausible from your Laravel backend. This lets you record things like signups, checkouts, or API-driven conversions without relying on client-side JavaScript. Events are sent cookie-free, keeping the privacy-friendly model Plausible is known for.
Is kilobyteno/laravel-plausible GDPR and cookie-consent compliant?
Plausible itself is cookieless and privacy-friendly, but compliance is still your application's responsibility. The package is a thin integration layer and does not manage consent gating, so you need to control when the script or tracking calls are injected based on your consent tooling. Align the implementation with your privacy and legal teams before enabling it in production.
Does it work with Inertia, Livewire, or other SPA setups?
The package's script injection typically covers the initial page load, so client-side navigations in Inertia or SPA-style apps may not register automatically. You will likely need to trigger pageview tracking on route changes yourself, for example by dispatching custom events or calling Plausible's JavaScript API. Validate this in staging with your specific navigation pattern before rolling out.
How do I exclude routes, environments, or internal users from tracking?
Exclusions are best handled at the application level rather than assumed from the package. Guard the injection point with environment checks so local and staging traffic never reaches production analytics, and skip rendering for admin routes or authenticated staff users. If you need route-level control, wrap the script or middleware in your own conditions rather than enabling it globally.
What content security policy changes are needed for the Plausible script?
You need to allow the Plausible script source and the event endpoint in your CSP, typically via script-src and connect-src for plausible.io or your self-hosted domain. If you use a strict nonce or hash policy, add the nonce to the injected script tag or configure a hash for it. Without these changes the script will be blocked and no analytics data will arrive.
Is this package actively maintained and safe for production?
The package is a thin wrapper with low runtime overhead, and release 1.4.0 introduced only Laravel 13 support alongside dependency updates. Recent release history appears largely dependabot-driven, so treat it as a low-risk but low-activity dependency rather than a feature-rich one. Pin a version, review changelogs on upgrade, and monitor data arrival after deployment.
What are the alternatives to using this package for Plausible in Laravel?
You can drop in Plausible's official JavaScript snippet directly in your Blade layout, which requires no package at all but gives you no Laravel configuration or service wiring. Alternatively, call the Plausible events API with Laravel's HTTP client for full control over server-side tracking. A proxy setup is another option if ad blockers are hurting data quality, and general analytics packages exist but are usually aimed at Google Analytics rather than Plausible.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle