Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gosquared

Package Overview
Dependencies
Maintainers
4
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gosquared

GoSquared for your Node.JS application

  • 3.1.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
34
increased by183.33%
Maintainers
4
Weekly downloads
 
Created
Source

node-gosquared

Travis Dependencies Join the chat at https://gitter.im/gosquared/node-gosquared

NPM

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

Installation

npm install --save gosquared

Usage

Tracking API

See the Tracking API docs site for full documentation.

Reporting API

var GoSquared = require('gosquared');

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

Methods mirror the structure of the GoSquared API:

gosquared[namespace][version][function]

Consult the Reporting API 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:

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 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:

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

Keywords

FAQs

Package last updated on 28 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc