Event

Track an event

POSTtracking/event

GoSquared events are a versatile way of tracking anything that is happening on your site or app. User actions, application errors, state transitions, and activity of all kinds can be tracked as an event.

Popular events are aggregated by name in the Trends dashboard.

You can search and filter by the top level event name in People CRM. Optionally, you can include extra data in the event body. However, event body data is not currently searchable, but it can be viewed on a per profile basis in People CRM.

How many unique event types/names can I track?

Take some time to think about the name you give to your events. You can name them anything you like, but it's best to use a clear, concise name.

Each GoSquared project can track up to 1000 custom events. Above this limit, events with new names will be ignored.

POST Body

event

ObjectRequired

name

StringRequired

data

Object

Properties associated with this event

timestamp

String

A valid ISO 8601 timestamp

person_id

String

The People person ID that this action is associated with.

If the identifier used is an email it should be prefixed with email: like this: email:jon@example.com

visitor_id

String

The anonymous visitor ID that this action is associated with.

page

Object

url

String

title

String

previous

Number

The index of the previous page, which will be immediately unloaded

index

Number

The page index that this event is associated with

referrer

String

ip

String

IP address of the visitor. Used to detect the visitor's location

character_set

String

language

String

user_agent

String

returning

Boolean

screen

Object

height

Number

width

Number

pixel_ratio

Number

Screen DPR

depth

Number

Screen colour depth

campaign

Object

name

String

source

String

medium

String

content

String

term

String

location

Object

timezone_offset

Number

last_pageview

String

ISO 8601 timestamp of when this visitor/person last did a pageview

total

Object

visits

Number

pageviews

Number

Definition

POST https://api.gosquared.com/tracking/v1/event

Example Request

gosquared.trackEvent('Event Name', {
  // store extra data along with the event
  // any JS type is supported
  someHelpful: 'data'
}, function(err, resp) { });


// Associate event with a user
var person = gosquared.createPerson('user-id');
person.trackEvent('Event Name', {
  additional: 'data'
}, function(err, resp) { });

Live Responseundefined undefined

Your API Key is not authorised for this endpoint