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

ActiveLibrary[API Development](/categories/api)

aitor72/segment
===============

A Segment bridge for Laravel

v3.5.0(5y ago)03MITPHPPHP ^7.1.3

Since Jul 6Pushed 4y agoCompare

[ Source](https://github.com/aitor72/Segment)[ Packagist](https://packagist.org/packages/aitor72/segment)[ RSS](/packages/aitor72-segment/feed)WikiDiscussions 3.5 Synced 1mo ago

READMEChangelogDependencies (6)Versions (22)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

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 94.7% 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.

###  Release Activity

Cadence

Every ~110 days

Recently: every ~202 days

Total

22

Last Release

1641d ago

Major Versions

v1.4.0 → v2.0.02017-08-06

v2.0.1 → v3.0.02018-03-03

PHP version history (3 changes)v1.0.0PHP &gt;=5.5.9

v2.0.0PHP ^7.0

v3.0.0PHP ^7.1.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/3dfce2172e60757e32b773a7b3c5035be317553815fdc683ac39847fba753a81?d=identicon)[aitor72](/maintainers/aitor72)

---

Top Contributors

[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (90 commits)")[![jbrooksuk](https://avatars.githubusercontent.com/u/246103?v=4)](https://github.com/jbrooksuk "jbrooksuk (3 commits)")[![coquer](https://avatars.githubusercontent.com/u/1929689?v=4)](https://github.com/coquer "coquer (1 commits)")[![danrovito](https://avatars.githubusercontent.com/u/8322674?v=4)](https://github.com/danrovito "danrovito (1 commits)")

---

Tags

apiAlt ThreeBridgesegmentiosegmentsegment.com

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[andreaselia/laravel-api-to-postman

Generate a Postman collection automatically from your Laravel API

1.0k586.2k3](/packages/andreaselia-laravel-api-to-postman)[resend/resend-laravel

Resend for Laravel

1191.4M6](/packages/resend-resend-laravel)[gregoriohc/laravel-trello

A Laravel wrapper and facade package for the Trello API

3366.8k2](/packages/gregoriohc-laravel-trello)

PHPackages © 2026

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