Repository navigation
PHP Tracker Setup
Mikho Juice edited this page Jun 1, 2017
·
1 revision
- 1 Installation
- 1.1 Composer
Currently the only supported method of installation is through Composer. For a tutorial on setting up a PHP project with Composer please follow this link.
Using Composer to manage your dependencies, simply add the Snowplow PHP Tracker to your project by including it in your composer.json file as a dependency.
{
"require": {
"snowplow/snowplow-tracker": "0.2.1"
}
}Assuming you have Composer setup correctly in the root of your project. Type the following command line argument:
composer install #If composer has not been run yet
composer update #If composer dependencies are already installedThis will install the Snowplow Tracker and allow you to initialize a Tracker object:
// Bare minimum Tracker initialization.
use Snowplow\Tracker\Tracker;
use Snowplow\Tracker\Subject;
use Snowplow\Tracker\Emitters\SyncEmitter;
$emitter = new SyncEmitter("collector_uri");
$subject = new Subject();
$tracker = new Tracker($emitter, $subject);Home | About | Project | Setup Guide | Technical Docs | Copyright © 2012-2017 Snowplow Analytics Ltd
HOME » SNOWPLOW SETUP GUIDE » Step 2: Setup a Tracker
- Step 1: Setup a Collector
-
Step 2a: Setup a Tracker
- 2.1: Setup the ActionScript 3.0 Tracker
- 2.2: Setup the Android Tracker
- 2.3: Setup the Arduino Tracker
- 2.4: Setup the Golang Tracker
- 2.5: Setup the iOS Tracker
- 2.6: Setup the Java Tracker
- 2.7: Setup the JavaScript Tracker
- 2.8: Setup the Lua Tracker
- 2.9: Setup the .NET Tracker
- 2.10: Setup the Node.js Tracker
- 2.11: Setup the PHP Tracker
- 2.12: Setup the Pixel Tracker
- 2.13: Setup the Python Tracker
- 2.14: Setup the Ruby Tracker
- 2.15: Setup the Scala Tracker
- 2.16: Setup the Unity Tracker
- Step 2b: Setup a Webhook
- Step 2c: Setup a Data Store Source
- Step 3: Setup Enrich
- Step 4: Setup alternative data stores
- Step 5: Data modeling
- Step 6: Analyze your data!
Useful resources