PHPackages                             woopra/woopra - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. woopra/woopra

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

woopra/woopra
=============

Woopra.com PHP Library

974.1k—0%5PHP

Since Apr 19Pushed 3y ago6 watchersCompare

[ Source](https://github.com/Woopra/woopra-php-sdk)[ Packagist](https://packagist.org/packages/woopra/woopra)[ RSS](/packages/woopra-woopra/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

Track customers directly in PHP using Woopra's PHP SDK

The purpose of this SDK is to allow our customers who have servers running PHP to track their users by writing only PHP code. Tracking directly in PHP will allow you to decide whether you want to track your users:

- through the front-end: after configuring the tracker, identifying the user, and tracking page views and events in PHP, the SDK will generate the corresponding JavaScript code, and you will be able to print that code in your pages' headers.
- through the back-end: after configuring the tracker &amp; identifying the user, add the optional parameter TRUE to the methods `track` or `push`, and the PHP tracker will handle sending the data to Woopra by making HTTP Requests. By doing that, the client is never involved in the tracking process.

The best way to install Woopra/Woopra-php-sdk is using [Composer](https://getcomposer.org/)

```
$ composer require woopra/woopra:dev-master
```

The first step is to setup the tracker SDK. To do so, import the woopra\_tracker.php file then configure the tracker instance as follows (replace mybusiness.com with your website as registered on Woopra):

```
require_once('woopra_tracker.php');
// require_once('vendor/autoload.php'); // for composer installation
$woopra = new WoopraTracker(array("domain" => "mybusiness.com"));
```

You can update your idle timeout (default: 30 seconds) by updating the timeout property in your WoopraTracker instance (NB: this could also have been done in the step above, by adding all the properties you wish to configure to the array):

```
$woopra->config(array("idle_timeout" => 15000)); // in milliseconds
```

If you don't want to keep the user online on Woopra when they don't commit any event between the last event and the idle\_timeout, you can disable auto pings (auto ping only matters for front-end tracking).

```
$woopra->config(array("ping" => false)); // default is true
```

To add custom visitor properties, you should use the identify($user) function:

```
$woopra->identify(array(
   "name" => "User Name",
   "email" => "user@company.com",
   "company" => "User Business"
));
```

If you wish to track page views, first call track(), and finally calling js\_code() in your page header will insert the woopra javascript tracker:

```

   ...

```

You can always track events through front-end later in the page. With all the previous steps done at once, it should look like:

```

      ...

      ...

      ...

```

To track a custom event through back-end, just specify the additional parameter TRUE in the track() functions.

```
$woopra->track($event_name, $event_properties, TRUE);
```

If you identify the user after the last tracking event, don't forget to push() the update to Woopra:

```
$woopra->identify($user)->push();
//or, to push through back-end:
$woopra->identify($user)->push(TRUE);
```

If you're only going to be tracking through the back-end, set the cookie (before the headers are sent):

```
$woopra->set_woopra_cookie();
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/cac86ecedecc94b8ee70d2a4aea6848876d16a464228726ad79cf19e125a6ade?d=identicon)[Woopra](/maintainers/Woopra)

---

Top Contributors

[![tyscorp](https://avatars.githubusercontent.com/u/462605?v=4)](https://github.com/tyscorp "tyscorp (3 commits)")[![billyvg](https://avatars.githubusercontent.com/u/79684?v=4)](https://github.com/billyvg "billyvg (2 commits)")[![eliekhoury](https://avatars.githubusercontent.com/u/171657?v=4)](https://github.com/eliekhoury "eliekhoury (1 commits)")[![encero](https://avatars.githubusercontent.com/u/1345022?v=4)](https://github.com/encero "encero (1 commits)")[![jad939933](https://avatars.githubusercontent.com/u/2121365?v=4)](https://github.com/jad939933 "jad939933 (1 commits)")[![williamrmyers](https://avatars.githubusercontent.com/u/6751717?v=4)](https://github.com/williamrmyers "williamrmyers (1 commits)")

### Embed Badge

![Health badge](/badges/woopra-woopra/health.svg)

```
[![Health](https://phpackages.com/badges/woopra-woopra/health.svg)](https://phpackages.com/packages/woopra-woopra)
```

###  Alternatives

[carrooi/nette-menu

Menu control for Nette framework

2950.0k1](/packages/carrooi-nette-menu)[misterion/pinba-phpdoc

@phpdoc extension php pinba for IDE autocomplete

1053.4k2](/packages/misterion-pinba-phpdoc)[zalanihir/country-state-city

Laravel package for country, state, city providers with the flags

276.0k](/packages/zalanihir-country-state-city)[netgen/richtext-datatype-bundle

Netgen RichText datatype bundle allows eZ Publish Legacy to work with rich text (ezrichtext) field type available in eZ Platform

1033.4k3](/packages/netgen-richtext-datatype-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
