# gosquared

> GoSquared for your Node.JS application

Latest version **3.1.0** (published 2015-07-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install gosquared
pnpm add gosquared
yarn add gosquared
bun add gosquared
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.1.0 |
| Published | 2015-07-28 |
| First published | 2012-11-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | simontabor, thedeveloper, gosquared, jt |
| Keywords | gosquared, people, user, event, analytics, tracking, reporting, metrics, API |

## Links

- npm: https://www.npmjs.com/package/gosquared
- Repository: git@github.com:gosquared/node-gosquared
- Homepage: https://github.com/gosquared/node-gosquared
- Issues: https://github.com/gosquared/node-gosquared/issues
- npm.io page: https://npm.io/package/gosquared

## Dependencies (1)

- [request](https://npm.io/package/request.md) ^2.51.0

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 3.1.0 (latest) — 2015-07-28
- 2.0.2 — 2015-02-04
- 2.0.1 — 2015-01-27
- 2.0.0 — 2015-01-27
- 1.0.1 — 2014-10-15
- 1.0.0 — 2014-10-09
- 0.3.4 — 2014-04-24
- 0.3.3 — 2014-02-11
- 0.3.2 — 2014-01-26
- 0.3.1 — 2014-01-22
- 0.3.0 — 2014-01-21
- 0.2.2 — 2013-12-06
- 0.2.1 — 2013-12-06
- 0.2.0 — 2013-12-06
- 0.1.7 — 2013-09-27
- … 8 more at https://npm.io/package/gosquared/versions

## README

# node-gosquared

[![Travis](https://api.travis-ci.org/gosquared/node-gosquared.svg)](https://travis-ci.org/gosquared/node-gosquared)
[![Dependencies](https://david-dm.org/gosquared/node-gosquared.svg)](https://david-dm.org/gosquared/node-gosquared)
[![Join the chat at https://gitter.im/gosquared/node-gosquared](https://img.shields.io/badge/gitter-join%20chat-blue.svg)](https://gitter.im/gosquared/node-gosquared)

[![NPM](https://nodei.co/npm/gosquared.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/gosquared)

The official GoSquared Node.js module for integrating the [GoSquared API][docs] into your Node.JS app with ease.

## Installation

```bash
npm install --save gosquared
```

## Usage

### Tracking API

See the [Tracking API][tracking-docs] docs site for full documentation.

### Reporting API

```javascript
var GoSquared = require('gosquared');

var gosquared = new GoSquared({
  api_key: 'demo',
  site_token: 'GSN-181546-E'
});
```

Methods mirror the structure of the GoSquared API:

```javascript
gosquared[namespace][version][function]
```

Consult the [Reporting API Docs][reporting-docs] for available namespaces, versions, and functions.

**Example**: We want to get the total number of visitors online on the site right now. For this, we need to use the `concurrents` function under the `v3` version of the `now` namespace:

```javascript
var GoSquared = require('gosquared');

var gosquared = new GoSquared({
  api_key: 'demo',
  site_token: 'GSN-181546-E'
});

gosquared.now.v3.concurrents(function(e,data) {
  if (e) return console.log(e);
  console.log(data)
});
```

All functions listed in the [Reporting API][reporting-docs] documentation are methods you can call on the ```gosquared``` object. The documentation also demonstrates the response data you can expect to get back.

## Run tests

Install test dependencies using ```npm install``` then:

```bash
SITE_TOKEN=<your site token> API_KEY=<your api key> npm test-tracking
SITE_TOKEN=<your site token> API_KEY=<your api key> npm test-retrieval
```

[reporting-docs]: https://gosquared.com/developer/api/
[tracking-docs]: https://gosquared.com/docs/tracking/api/
[docs]: https://gosquared.com/docs

---
_Source: https://npm.io/package/gosquared · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
