We are pleased to announce the release of the first version of the Snowplow PHP Tracker. The tracker supports synchronous GET and POST requests.
This introductory post will cover the following topics:
- How to use the tracker
- Getting help
The Snowplow PHP Tracker is published to Packagist, the central repository for Composer PHP packages. To add it to your project, add it as a requirement in your
Then simply run
composer update from the root of your project to install it.
Add class aliases to the Snowplow Tracker to include it in your project:
Create an emitter which will synchronously send HTTP POST requests:
It is also possible to specify the protocol, method, and port that the emitter will use, as well as a
$buffer_size which determines the minimum number of events to queue before sending them all.
Create a subject to hold data about a specific user:
Create a tracker:
Send some events:
Some useful resources:
This is only the first version of the Snowplow PHP Tracker, so please raise an issue if you find any bugs. If you have an idea for a new feature or need help getting set up, get in touch!