Documentation

A webhook is a callback that make an HTTP request to a external website (configured for the webhook) based on events on that occur elsewhere (on another website).

Webhooks are an easy way to add your own custom analytics hooks to the data you’re sending to Replay.

You can toggle on Webhooks in Replay just like any other integration.

Once you do so, we’ll immediately start forwarding data to the HTTP(s) endpoint you specified.

Events

Once you toggle on webhooks, we’ll start sending you event requests that we receive on our own API. We’ll send you a HTTP(s) POST request that looks like the following:

POST https://your-webhook-url.com/xxx
Content-Type: 'application/json'
{
  "client_id": "e4bfcb30-e788-11e3-b428-6718f9a0f592",
  "distinct_id": "a3098fjs2",
  "event_name": "Signed Up",
  "replay_key": "20394281092",
  "session_id": "55b17871-fbc5-11e3-9727-3965d78f0c34"
  "properties": {
    "page_url": "example_url.com",
    "timestamp": 23481219,
    "ip": "203.0.113.9",
    "extra": "additional settings"
  }
}

Traits

We’ll also send you trait requests to the same endpoint. We’ll send you a HTTP(s) POST request that looks like the following:

POST https://your-webhook-url.com/xxx
Content-Type: 'application/json'
{
  "client_id":  "e4bfcb30-e788-11e3-b428-6718f9a0f592",
  "distinct_id": "a3098fjs2",
  "replay_key": "20394281092",
  "session_id": "55b17871-fbc5-11e3-9727-3965d78f0c34"
  "properties": {
    "email": "example@gmail.com",
    "name": "Example Name",
    "page_url": "example_url.com",
  }
}