The GoSquared API is a fast, powerful way to retrieve current and historical analytics information that updates in real-time. It also allows you to programmatically manage GoSquared accounts.

All analytics data collected by GoSquared is available via the API. You can use the API for just about anything, from simple data exports to full-blown analytics applications and reports.

Getting started

The API is organised into 4 sections:

  • Account - Manage GoSquared accounts and configuration.
  • Ecommerce - Retrieve Ecommerce metrics.
  • Now - Retrieve real-time information about visitors and sites.
  • Trends - Retrieve historical trends, aggregations and summaries.

Making Requests

Check out the list of available language clients and modules you can use to make working with the API easier and faster.

Otherwise, it is trivial to work with the API directly. Requests are made using a simple RESTful HTTP(S) interface:

METHOD http[s]://[parameters]

The requests are made up of the following components, which change depending on the information you want to retrieve:

METHODHTTP GET/POST/PUT/DELETE. These change the behaviour of the function.
sectionThe section to use: account, now or trends
versionThe version of the section to use.
functionNameThe name of the function[s] you want to use. All available functions can be found listed in the sidebar of the documentation for each section.
parametersQuery string parameters, in the usual format: [?param1=value1][&param2=value2][...]

Each function accepts its own set of optional or required query string parameters. These are described on the function's documentation page. Most of the time, you'll need to at least specify the parameters required for authentication.