PHPackages                             marekzelezny/plausible - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. marekzelezny/plausible

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

marekzelezny/plausible
======================

Simple package for managing Plausible with PHP

04PHP

Since May 31Pushed 2y ago1 watchersCompare

[ Source](https://github.com/marekzelezny/plausible)[ Packagist](https://packagist.org/packages/marekzelezny/plausible)[ RSS](/packages/marekzelezny-plausible/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Plausible
=================

[](#laravel-plausible)

Simple package for managing Plausible tracking with PHP.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require marekzelezny/plausible
```

Add the following line to your layout file's `` tag:

```

```

Add the plausible domain from `config/plausible.php` to env file:

```
PLAUSIBLE_DOMAIN=example.com
```

Usage
-----

[](#usage)

You can enable tracking of these Plausible features:

- Custom properties for pageview
- Outbound link clicks
- File downloads

### Custom properties for pageview

[](#custom-properties-for-pageview)

To enable this feature you have to add this line in your ENV file:

```
PLAUSIBLE_TRACKING_PAGEVIEW_PROPS=true
```

Then you can add custom properties to your pages by using function `plausible()` inside your controllers.

Example usage:

```
plausible()
    ->property('pageType', 'article')
    ->property('category', 'news');
```

Which in return will output this to your page where you have added ``:

```

    window.plausible = window.plausible || function() {
        (window.plausible.q = window.plausible.q || []).push(arguments)
    }

    plausible('pageview', {
        props: {
            pageType: 'article',
            category: 'news'
        }
    });

```

You can also add multiple values of one property at once:

```
plausible()
    ->property('author', ['John Doe', 'Jane Doe'])
```

Which in return will add multiple values to one property by calling:

```
plausible('pageview', {
    props: {author: 'John Doe'}
});

plausible('pageview', {
    props: {author: 'Jane Doe'}
});
```

Which is currently the only way to add multiple values to one property at the moment, as Plausible does not support arrays yet.

#### Global default properties

[](#global-default-properties)

You can also set global default properties for all pageviews by adding them in app service provider's `boot()` method.

### Outbound link clicks, File downloads

[](#outbound-link-clicks-file-downloads)

Outbound and File downloads require additional setting of goals in Plausible dashboard. You might get more information [here](https://plausible.io/docs/goal-conversions).

Once you have setup goals in Plausible dashboard, you can enable tracking of these features:

```
PLAUSIBLE_TRACKING_OUTBOUND_LINK_CLICKS=true
PLAUSIBLE_TRACKING_FILE_DOWNLOADS=true
```

This will add Plausible scripts for tracking outbound link clicks and file downloads, which are then tracked automatically.

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/40f0600d5cfdb9972a5fce25158a80a5ce4946ed5e526bd610daa8f49994e401?d=identicon)[marekzelezny](/maintainers/marekzelezny)

---

Top Contributors

[![marekzelezny](https://avatars.githubusercontent.com/u/6258792?v=4)](https://github.com/marekzelezny "marekzelezny (3 commits)")

### Embed Badge

![Health badge](/badges/marekzelezny-plausible/health.svg)

```
[![Health](https://phpackages.com/badges/marekzelezny-plausible/health.svg)](https://phpackages.com/packages/marekzelezny-plausible)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
