Skip to content

TeamLifecycle/lifecycle-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lifecycle-php

Installation

Using Composer

To install lifecycle-php with Composer, just add the following to your composer.json file:

{
    "require": {
          "lifecycle/lifecycle" : "^0.0"
    }
}

or by running the following command:

composer require lifecycle/lifecycle

Composer installs autoloader at ./vendor/autoloader.php. to include the library in your script, add:

require_once 'vendor/autoload.php';

If you use Symfony2, autoloader has to be detected automatically.

You can see this library on Packagist.

Usage

Creating a Request

So you're probably wondering how to use this library for quick and easy api calls to Lifecycle. Check out this example.

TO INITIALIZE:

lifecycle = new Lifecycle('YOUR_LIFECYCLE_API_KEY');

TO IDENTIFY:

lifecycle::identify('$params');  //check out the example params below.

TO TRACK:

lifecycle::track('$event_id, $unique_id');
//Example of params variable to use with identify call
$params = array( "unique_id" => "1234",
        		"first_name" => "Nathan",
        		"last_name" => "Mooney",
    			"email_address" => "someone@lifecycle.io",
        		"phone_number" => "12345678913")

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages