Use webhooks to build custom integrations. Anything that would normally trigger a notification, can be used to post a webhook to a specified URL.

  • Traffic Spike/Dip – payload contains the number of visitors currently on your site and a summary of your site's traffic info.
  • User enters/exits a Smart Group – payload contains the full profile info and the name of the group they entered/exited.
  • New live chat message – payload contains the chat message and profile information about the user who sent it.

GoSquared will issue an HTTP POST request to the URL you specify with a JSON payload containing details of the triggered notification.

Setting up a Webhook

  1. Log in to GoSquared and go to Setting > Current Project > Integrations

  2. Add a Webhook service (don't forget to give it a memorable name) and paste the URL that will receive the HTTP POST request. Your URL must be secure https.

  3. Next, navigate to the Notifications tab in your Project Settings. Here you will be able to configure which notification types should send a Webhook.

  4. Either add a new notification or edit an existing one, and select the Webhook service in the delivery options.

Note: there is currently no way to manually post a Webhook – you have to trigger a Webhook by creating the conditions that you set in your notification (i.e. set a traffic spike of greater than 1 visitor on the site, or create a test smart group that checks filters for last seen within the last 5 minutes).

Smart Group Webhooks (People CRM)

Currently in beta and subject to change.

These are useful for triggering an action in a 3rd party application/service. For example, when a user enters your 'Latest Signups' Smart Group – send a Webhook to your email service and trigger a welcome email.

Each Webhook is sent with a semver compliant version number in the version property of the JSON object. Your code should check this property when processing each Webhook request to ensure it is compatible. We do not make breaking changes frequently, but if we do we will notify anyone set up to receive Webhooks in advance.

Smart Group JSON payloadview example here

Traffic Spike / Dip Webhooks (Analytics)

Example JSON payload:

  "concurrents": 1234,         // Total number of visitors on the site at the time of the alert

  "triggeredAlert": { ... },   // Details of the specific alert that was triggered

  "siteDetails": { ... },      // Summary details of the site against which the alert was triggered

  "snapshot": {                // Snapshot of the site's traffic data at the time of the alert,
    "time": { ... },           // all keys contain the equivalent data returned by the corresponding
    "concurrents": { ... },    // function in the Now API
    "pages": { ... }
    "sources": { ... },
    "engagement": { ... },
    "timeSeries": { ... }