PHPackages                             unicornpartners/laravel9-segment - 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. unicornpartners/laravel9-segment

ActiveLibrary

unicornpartners/laravel9-segment
================================

A Segment bridge for Laravel

00PHP

Since Jan 18Pushed 3y agoCompare

[ Source](https://github.com/duyemura/laravel9-segment)[ Packagist](https://packagist.org/packages/unicornpartners/laravel9-segment)[ RSS](/packages/unicornpartners-laravel9-segment/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Alt Three Segment](https://user-images.githubusercontent.com/2829600/71490849-0de16e00-2825-11ea-87a6-ddada0f35224.png)](https://user-images.githubusercontent.com/2829600/71490849-0de16e00-2825-11ea-87a6-ddada0f35224.png)

[![Build Status](https://camo.githubusercontent.com/72e168003f13fd43d33f96920a71f9ca10eccdab8e88f7edf81d4bb50c7f418a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f416c7454687265652f5365676d656e742f54657374733f6c6162656c3d5465737473267374796c653d666c61742d737175617265)](https://github.com/AltThree/Segment/actions?query=workflow%3ATests)[![StyleCI Status](https://camo.githubusercontent.com/e66062c259888824cafa42f540b190d9e2810b6302b410737f76bc6c82997563/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f33383035363139372f736869656c64)](https://github.styleci.io/repos/38056197)[![Software License](https://camo.githubusercontent.com/c090e080484e2a2bc766446291d04437db823929042bf614b26a1643660ddf6f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e3f7374796c653d666c61742d737175617265)](LICENSE)[![Packagist Downloads](https://camo.githubusercontent.com/a4e7e5730621eed50939d7cce61747b4e5b7072e559fe0961dd4f6cf1e53fc03/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c742d74687265652f7365676d656e743f7374796c653d666c61742d737175617265)](https://packagist.org/packages/alt-three/segment)[![Latest Version](https://camo.githubusercontent.com/c0021bb8157e6a04e544e4dfb89fc8b17122f6411737558663289c006b314c0d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f416c7454687265652f5365676d656e743f7374796c653d666c61742d737175617265)](https://github.com/AltThree/Segment/releases)

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

[](#installation)

Alt Three Segment is a [Segment](https://segment.com/) bridge for Laravel. This version requires [PHP](https://php.net) 7.1-7.4, and supports Laravel 5.5-8. Simply require the package using [Composer](https://getcomposer.org):

```
$ composer require alt-three/segment:^3.5
```

Once installed, if you are not using automatic package discovery, then you need to register the `AltThree\Segment\SegmentServiceProvider` service provider in your `config/app.php`.

Configuration
-------------

[](#configuration)

Alt Three Segment requires configuration.

To get started, you'll need to publish all vendor assets:

```
$ php artisan vendor:publish
```

This will create a `config/segment.php` file in your app that you can modify to set your configuration. Also, make sure you check for changes to the original config file in this package between releases.

Usage
-----

[](#usage)

Once you've set your `write_key` value in the configuration, you're ready to go! For the most part you can follow [Segments own instructions](https://segment.com/docs/libraries/php/quickstart) however, you'll want to replace the `Analytics` classname with `Segment` - plus, you don't need to call `class_alias`.

### Identify the user

[](#identify-the-user)

```
Segment::identify([
    'userId' => '12345abcde',
    'traits' => [
        'name' => 'James Brooks',
        'email' => 'test@test.com',
    ],
]);
```

### Track actions

[](#track-actions)

```
Segment::track([
    'userId' => '12345abcde',
    'event' => 'Did something',
    'properties' => [
        'was_awesome' => true,
    ],
]);
```

Security
--------

[](#security)

Our full security policy is available to read [here](https://github.com/AltThree/Segment/security/policy).

License
-------

[](#license)

Alt Three Segment is licensed under [The MIT License (MIT)](LICENSE).

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity23

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/d7e956868f9f57586e0befaf82dc86e6e1d86875b245ff6fe90e4638ca62eeed?d=identicon)[duyemura](/maintainers/duyemura)

---

Top Contributors

[![duyemura](https://avatars.githubusercontent.com/u/218838?v=4)](https://github.com/duyemura "duyemura (1 commits)")

### Embed Badge

![Health badge](/badges/unicornpartners-laravel9-segment/health.svg)

```
[![Health](https://phpackages.com/badges/unicornpartners-laravel9-segment/health.svg)](https://phpackages.com/packages/unicornpartners-laravel9-segment)
```

PHPackages © 2026

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