# Install the PHP tracker
> Install the PHP tracker using Composer for tracking events in PHP applications.
> Source: https://docs.snowplow.io/docs/sources/php-tracker/setup/
> Documentation index: https://docs.snowplow.io/llms.txt

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](https://getcomposer.org/doc/00-intro.md).

Add the Snowplow PHP Tracker to your project by running:

```bash
composer require snowplow/snowplow-tracker
```

to include it in your `composer.json` file as a dependency.

You can also add it manually:

```json
{
  "require": {
      "snowplow/snowplow-tracker": "0.9.2"
  }
}
```

Assuming you have Composer setup correctly in the root of your project. Type the following command line argument:

```bash
composer update # Will update lockfile and install dependencies
```

This will install the Snowplow Tracker and allow you to initialize a Tracker object:

```php
// 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);
```
