# GoSquared Destination

## Destination Info

* Accepts [Page](/docs/segment/connections/spec/page), [Identify](/docs/segment/connections/spec/identify), [Track](/docs/segment/connections/spec/track) calls.
* Refer to it as **GoSquared** in the [Integrations object.](/docs/segment/guides/filtering-data/#filtering-with-the-integrations-object)

### Components

* [Browser](https://github.com/segment-integrations/analytics.js-integration-gosquared)

## Connection Modes

[Learn more about connection modes.](/docs/segment/connections/destinations/#connection-modes)

### Device-Mode

* web: yes
* mobile: no
* server: no

### Cloud-Mode

* web: no
* mobile: no
* server: no

## Getting Started

When you enable GoSquared in the Segment web app, your changes appear in the Segment CDN in about 45 minutes, and then Analytics.js starts asynchronously loading GoSquared's Tracker onto your page.

This means you should remove any manual integration of GoSquared.

Your GoSquared Now dashboard will instantly start showing the number of visitors online, and if you're using `identify`, users will start appearing in People Analytics.

GoSquared supports mobile, webpage and server-side tracking.

## Website Tracking

When you enter your GoSquared site token into Segment, website tracking will automatically start.

## Mobile and Server-Side Tracking

To track data using Segment's mobile and server-side sources, you will need to enter a GoSquared API Key, which can be created in your [GoSquared account](https://www.gosquared.com/settings/api). The API Key must have "Write Tracking" access. All functionality is supported by mobile and server-side tracking.

## Page

When you call [`page`](/docs/segment/connections/spec/page/), we call GoSquared's [`track`](https://www.gosquared.com/docs/tracking/api/js#pageviews) to track a pageview. By default the Segment JavaScript snippet includes a call to [`page`](/docs/segment/connections/spec/page/) so you don't need to add it manually.

Page calls will be tracked from any Segment library, but GoSquared's real-time analytics will be most accurate using front-end website tracking.

## Identify

When you call [`identify`](/docs/segment/connections/spec/identify/), we call GoSquared's [`identify`](https://www.gosquared.com/docs/tracking/api/js#identify). Once identified with a `userId`, that person (along with historical browsing information from before they were identified) will be visible and queryable in [GoSquared People Analytics](https://www.gosquared.com/software/people).

GoSquared expects a slightly different set of traits from us, so we start by transforming the traits to match their format.

| Our trait   | GoSquared property |
| ----------- | ------------------ |
| `firstName` | `first_name`       |
| `lastName`  | `last_name`        |
| `createdAt` | `created_at`       |
| `title`     | `company_position` |
| `industry`  | `company_industry` |

GoSquared recognises certain traits as "special" and requires all other traits to be sent under a namespace of `custom`. The Segment code handles all of this, sending recognised [special properties](https://www.gosquared.com/docs/tracking/api/js#properties) and custom properties in the correct places.

## Track

When you call [`track`](/docs/segment/connections/spec/track/), we call GoSquared's [`event`](https://www.gosquared.com/docs/tracking/api/js#events) with the same arguments.

## Screen

GoSquared supports the [`screen`](/docs/segment/connections/spec/screen/) method by converting it into an event, with an event name of `"Screen: " + name`.

## Group

GoSquared converts the [`group`](/docs/segment/connections/spec/group/) method into an identify call, to set the company details for a user. Only one company/group is supported per user.

## Ecommerce

GoSquared supports our [Ecommerce tracking API](/docs/segment/connections/spec/ecommerce/v2/#order-completed), so the `Order Completed` event will be tracked as a [GoSquared Transaction](https://www.gosquared.com/docs/tracking/api/js#transactions).

## Engage

You can send computed traits and audiences generated using [Engage](/docs/segment/engage) to this destination as a **user property**. To learn more about Engage, schedule a [demo](https://segment.com/contact/demo).

For user-property destinations, an [identify](/docs/segment/connections/spec/identify/) call is sent to the destination for each user being added and removed. The property name is the snake\_cased version of the audience name, with a true/false value to indicate membership. For example, when a user first completes an order in the last 30 days, Engage sends an Identify call with the property `order_completed_last_30days: true`. When the user no longer satisfies this condition (for example, it's been more than 30 days since their last order), Engage sets that value to `false`.

When you first create an audience, Engage sends an Identify call for every user in that audience. Later audience syncs only send updates for users whose membership has changed since the last sync.

> \[!NOTE]
>
> Real-time audience syncs to GoSquared  may take six or more hours for the initial sync to complete. Upon completion, a sync frequency of two to three hours is expected.

## Settings

Segment lets you change these destination settings from the Segment app without having to touch any code.

| Field                 | Description                                                                                                                                                                                                                               | Required | Type    |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- |
| Anonymize IP          | Enable if you need to anonymize the IP address of visitors to your website.                                                                                                                                                               | No       | boolean |
| API Key (Server-side) | Generate your server-side API key here: https://www.gosquared.com/settings/api                                                                                                                                                            | No       | string  |
| Site Token            | You can find your Site Token by viewing the GoSquared \[Integration guide]\(https://www.gosquared.com/integration/). It should look something like \`GSN-123456-A\`.                                                                      | No       | string  |
| Cookie Domain         | Use this if you wish to share GoSquared’s tracking cookies across subdomains, \`.example.com\` will enable shared tracking across all example’s subdomains. By default, cookies are set on the current domain (including subdomain) only. | No       | string  |
| Track Hash            | Enable if you'd like page hashes to be tracked alongside the page URL. By default, \`example.com/about#us\` will be tracked as \`example.com/about\`.                                                                                     | No       | boolean |
| Track Local           | Enable to track data on local pages/sites (using the \`file://\` protocol, or on \`localhost\`). This helps prevent local development from polluting your stats.                                                                          | No       | boolean |
| Track Parameters      | Disable to ignore URL querystring parameters from the page URL, for example \`/home?my=query\&string=true\` will be tracked as \`/home\` if this is set to disabled.                                                                      | No       | boolean |
| Use Cookies           | Disable this if you don't want to use cookies                                                                                                                                                                                             | No       | boolean |
