Download the PHP package printu/customerio without Composer
On this page you can find all versions of the php package printu/customerio. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download printu/customerio
More information about printu/customerio
Files in printu/customerio
Package customerio
Short Description PHP API for Customer.io
License MIT
Homepage http://customer.io/
Informations about the package customerio
Customer.io API Client
PHP bindings for the Customer.io API.
There are two primary API hosts available for to integrate with:
Behavioral Tracking
https://track.customer.io/api/v1/ \ Behavioral Tracking API is used to identify and track customer data with Customer.io.
API
https://api.customer.io/v1/api/ \ API allows you to read data from your Customer.io account for use in custom workflows in your backend system or for reporting purposes.
Installation
The API client can be installed via Composer.
In your composer.json file:
Once the composer.json file is created you can run composer install
for the initial package install and composer update
to update to the latest version of the API client.
The client uses Guzzle.
Basic Usage
Remember to include the Composer autoloader in your application:
Configure your access credentials when creating a client:
Change region to EU
Local Testing
Run phpunit
from the project root to start all tests.
Examples
Customers
Events
Anonymous event example usage.
Segments
Check for other available methods here
PageView
Campaigns
Check for other available methods here
See here for more examples of API Triggered Broadcasts
V2 Track API
The Track API allows you to send entity-based operations to Customer.io. You can use it for both single operations and batch operations.
Note: The
identify
action is used to create or update an entity.
Single Entity Operation
Create or update a person entity.
Create or update an object entity.
Delete an entity
Add relationships to a person
Batch Operations
Main differences with V1
The Track V2 API introduces an entity-centric approach, contrasting with V1's action-based model. The key difference lies in the request structure:
- V1 API: Actions come first (identify, track event) through the endpoint followed by the target entity you provide.
- V2 API: The target entity type comes first (person, object) followed by the action to perform.
This new approach provides a more intuitive way to interact with your data by focusing first on what entity you're working with before specifying what you want to do with it. It also allows the API to have only two endpoint for all operations.
In theory, all v1 operations can be done with v2 but the v2 API does not support all v1 operations yet.
For more details, see the Track V2 API documentation.
License
MIT license. See the LICENSE file for more details.