PHPackages                             thomas-dotworx/gosquared-php-sdk - 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. [API Development](/categories/api)
4. /
5. thomas-dotworx/gosquared-php-sdk

ActiveLibrary[API Development](/categories/api)

thomas-dotworx/gosquared-php-sdk
================================

1.0.3(11y ago)01.7kMITPHP

Since Apr 27Pushed 11y ago1 watchersCompare

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

READMEChangelog (3)DependenciesVersions (5)Used By (0)

GoSquared PHP SDK
=================

[](#gosquared-php-sdk)

The official GoSquared PHP module for integrating the [GoSquared API](https://beta.gosquared.com/docs) into your PHP app with ease.

Usage
-----

[](#usage)

### Tracking API

[](#tracking-api)

See the [Tracking API](https://beta.gosquared.com/docs/tracking/api/) docs site for full documentation.

### Reporting API

[](#reporting-api)

The reporting APIs and their functions are listed on [Reporting API](https://www.gosquared.com/developer/api/) docs site.

Quick guide
-----------

[](#quick-guide)

```
require_once('gosquared-php-sdk/main.php');

$opts = array(
  'site_token' => 'your-site-token',
  'api_key' => 'your-api-key'
);
$GS = new GoSquared($opts);

// Track events
$result = $GS->track_event('Event Name');

// Create anonymous Person
$person = $GS->create_person();

// Identify person
$response = $person->identify('user-id', array(
  'name' => 'Foo Bar',
  'email' => 'foo@bar.com'
));

// Retrieve live data
$result = $GS->now->concurrents();

// Retrieve historical data
$result = $GS->trends->aggregate();

// Retrieve Ecommerce data
$result = $GS->ecommerce->transactions();
```

Requirements
------------

[](#requirements)

- PHP &gt;= 5.2.0
- cURL

Running tests
-------------

[](#running-tests)

```
make test
```

To test with your own site token and api key, you can prefix this command with the SITE\_TOKEN and API\_KEY environment variables containing your keys. **WARNING: this will track test data under your account**

Debugging
---------

[](#debugging)

To switch on debug logs, place the following define statement before including this library:

```
define('GOSQUARED_DEBUG', true);
```

Debug output will then be sent to the standard output streams. Common places to find the output are your console (if run with CLI), your web server logs, or php-fpm logs.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

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.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

4039d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/acc7e100b13815fac41e84fce2136203e6fc2b37f5616df9ce6eb632110b1c5c?d=identicon)[thomas-dotworx](/maintainers/thomas-dotworx)

---

Top Contributors

[![TheDeveloper](https://avatars.githubusercontent.com/u/432425?v=4)](https://github.com/TheDeveloper "TheDeveloper (16 commits)")[![simontabor](https://avatars.githubusercontent.com/u/1441031?v=4)](https://github.com/simontabor "simontabor (4 commits)")

### Embed Badge

![Health badge](/badges/thomas-dotworx-gosquared-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/thomas-dotworx-gosquared-php-sdk/health.svg)](https://phpackages.com/packages/thomas-dotworx-gosquared-php-sdk)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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