2017 © Pedro Peláez
 

library segment

Segment.com wrapper written for Laravel

image

cachethq/segment

Segment.com wrapper written for Laravel

  • Tuesday, December 29, 2015
  • by joecohens
  • Repository
  • 5 Watchers
  • 15 Stars
  • 15,874 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Laravel Segment

Segment.com wrapper for Laravel 5., (*1)

THIS PACKAGE IS NOW DEPRECATED. PLEASE LOOK AT ALTTHREE/SEGMENT, (*2)

Installation

Add the following to your composer.json file., (*3)

"require": {
    "cachethq/segment": "~2.1"
}

Get the package installed., (*4)

$ composer update

Add the service provider to app.php, (*5)

'providers' => [
    // ...
    'CachetHQ\Segment\SegmentServiceProvider',
],

If you want to use the Facade, also add the alias:, (*6)

'aliases' => [
    // ...
    'Segment'  => 'CachetHQ\Segment\Facades\Segment',
],

Install the configuration file., (*7)

$ php artisan vendor:publish

Update the new configuration file with your write_key as provided by Segment.com, (*8)

Using Laravel Segment

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 however, you'll want to replace the Analytics classname with Segment - plus, you don't need to call class_alias., (*9)

Identify the user

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

Track actions

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

License

Laravel Segment is licensed under The MIT License (MIT)., (*10)

The Versions

29/12 2015

dev-master

9999999-dev

Segment.com wrapper written for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Graham Campbell
by Joseph Cohen

laravel api framework segment.io segment segment.com cachet cachethq cachet hq laravel segment

27/06 2015

2.1.2

2.1.2.0

Segment.com wrapper written for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Graham Campbell
by Joseph Cohen

laravel api framework segment.io segment segment.com cachet cachethq cachet hq laravel segment

26/05 2015

2.1.1

2.1.1.0

Segment.com wrapper written for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Graham Campbell
by Joseph Cohen

laravel api framework segment.io segment segment.com cachet cachethq cachet hq laravel segment

25/05 2015

2.1.0

2.1.0.0

Segment.com wrapper written for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Graham Campbell
by Joseph Cohen

laravel api framework segment.io segment segment.com cachet cachethq cachet hq laravel segment

21/03 2015

2.0.0

2.0.0.0

Segment.com wrapper written for Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Joseph Cohen

laravel api framework segment.io segment segment.com cachet cachethq laravel segment

09/02 2015

1.0.0

1.0.0.0

Segment.com wrapper written for Laravel 4

  Sources   Download

MIT

The Requires

 

laravel api framework segment.io segment segment.com cachet cachethq laravel segment