PHPackages                             arcdigital/laravel-posthog - 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. [API Development](/categories/api)
4. /
5. arcdigital/laravel-posthog

ActiveLibrary[API Development](/categories/api)

arcdigital/laravel-posthog
==========================

PostHog Integration for Laravel

0.0.3(3y ago)1170[2 PRs](https://github.com/arcdigital/laravel-posthog/pulls)MITPHPPHP ^8.1|^8.2

Since Feb 18Pushed 2y ago1 watchersCompare

[ Source](https://github.com/arcdigital/laravel-posthog)[ Packagist](https://packagist.org/packages/arcdigital/laravel-posthog)[ Docs](https://github.com/arcdigital/laravel-posthog)[ GitHub Sponsors](https://github.com/sponsors/arcdigital)[ RSS](/packages/arcdigital-laravel-posthog/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (15)Versions (6)Used By (0)

PostHog for Laravel
===================

[](#posthog-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/03ab2e691a73405e87f707f5c6f62481431b006a1a79fb76d6ab58a4bc5c7d62/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6172636469676974616c2f6c61726176656c2d706f7374686f672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/arcdigital/laravel-posthog)[![Total Downloads](https://camo.githubusercontent.com/187e6e53ea0ea42f6cfc1c39035bbd4be09c97e723b60142f3fae34037bec1a7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6172636469676974616c2f6c61726176656c2d706f7374686f672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/arcdigital/laravel-posthog)[![Tests](https://camo.githubusercontent.com/cf255f24d55461a71a3fd2d091fed9ec81bf6cc4f2e58768a2a82a5b0ef35c24/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6172636469676974616c2f6c61726176656c2d706f7374686f672f72756e2d74657374732e796d6c3f6272616e63683d6d6173746572266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/arcdigital/laravel-posthog/actions/workflows/run-tests.yml)[![PHPStan](https://camo.githubusercontent.com/b4ee859ebf9462f96893c54008b4b3257f69c97776b663ae92e61c35ebd49c8f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6172636469676974616c2f6c61726176656c2d706f7374686f672f7068707374616e2e796d6c3f6272616e63683d6d6173746572266c6162656c3d7068707374616e267374796c653d666c61742d737175617265)](https://github.com/arcdigital/laravel-posthog/actions/workflows/phpstan.yml)[![Code Style](https://camo.githubusercontent.com/c6aec25dff9ff30edb3fdde5fde8319230c0011acf69a9563e50d82451471e0b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6172636469676974616c2f6c61726176656c2d706f7374686f672f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d6173746572266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/arcdigital/laravel-posthog/actions/workflows/fix-php-code-style-issues.yml)

A package for integrating PostHog with your Laravel app.

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

[](#installation)

You can install the package via composer:

```
composer require arcdigital/laravel-posthog
```

If you are using Laravel, you can publish the config file with:

You can publish the config file with:

```
php artisan vendor:publish --tag="posthog-config"
```

Usage
-----

[](#usage)

```
use PostHog\PostHog;

PostHog::capture(array(
    'distinctId' => 'test-user',
    'event' => 'test-event'
));
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Anand Capur](https://github.com/arcdigital)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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.

###  Release Activity

Cadence

Every ~2 days

Total

3

Last Release

1227d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/53413269f9ef839022f59d939bc3e0217db52c5ae1d3756aef2b4eab3f38c4ac?d=identicon)[arcdigital](/maintainers/arcdigital)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")[![arcdigital](https://avatars.githubusercontent.com/u/551002?v=4)](https://github.com/arcdigital "arcdigital (4 commits)")

---

Tags

phplaravelsdkposthog

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/arcdigital-laravel-posthog/health.svg)

```
[![Health](https://phpackages.com/badges/arcdigital-laravel-posthog/health.svg)](https://phpackages.com/packages/arcdigital-laravel-posthog)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.6k3](/packages/defstudio-telegraph)[propaganistas/laravel-disposable-email

Disposable email validator

6023.0M6](/packages/propaganistas-laravel-disposable-email)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M100](/packages/dedoc-scramble)[api-platform/laravel

API Platform support for Laravel

58171.4k14](/packages/api-platform-laravel)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

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