The Snowplow PHP Tracker allows you to track Snowplow events from your PHP apps and scripts.
There are three basic types of object you will create when using the Snowplow PHP Tracker: Trackers, Subjects and Emitters.
A subject represents a user whose events are tracked. A tracker constructs events and sends them to one or more emitters. Each emitter then sends the event to the endpoint you configure, a Snowplow collector.
The current flow of the PHP Tracker is illustrated below:
To instantiate a new Tracker instance we need to make sure the Snowplow Tracker classes are available.
The Subject object lets you send any additional information about your application's environment, current user etc to Snowplow.
We now support four different emitters: sync, socket, curl and an out-of-band file emitter. The most basic emitter only requires you to specify the type of emitter to be used and the collectors URI as parameters.
📄️ Tracking an event
Tracking methods supported by the PHP Tracker: