Webhooks
Use the Webhooks destination to send Freshpaint data to any public HTTP endpoint. This integration can support a wide range of use cases that may not be supported by other destinations. For example you could use the Webhooks Destination to send data to Make (formerly known as Integromat) to perform no-code automation workflows.
Destination Info
Supports HIPAA mode
Connection Modes:
Client-side | Server-side | |
---|---|---|
Web | ||
Mobile | ||
Server |
Getting Started
To set up the Webhooks destination, follow the following steps:
Go to the Webhooks configuration page in Freshpaint and click "Configure"
Add the URL of the webhook that will receive your data
(Optional) Add any headers that need to be sent to your webhook. For example some webhooks may require the
Content-Type: application/json
header.(Optional) Add additional webhook URLs if you want to send data to additional webhooks.
Events
When you send an event to the Webhooks destination from Freshpaint, Freshpaint will send an HTTP POST request to each of the webhooks you've configured. The body of the request will look like the following:
Identify
By default, identify events are not sent to the Webhooks destination. Enable them on the Webhooks destination configuration page under "Options".
When you call freshpaint.identify('hello@example.com', {"phone": "+15558675309"})
, the body of the HTTP POST request sent to each webhook will look like this:
Page
By default, pageview events are not sent to the Webhooks destination. Enable them on the Webhooks destination configuration page under "Options".
When a pageview event occurs, the body of the HTTP POST request sent to each webhook will look like this:
Group
When you call freshpaint.group("Acme, Inc", {"companyId": "1234"})
, the body of the HTTP POST request sent to each webhook will look like this:
Payload Format
Here is what each piece of the HTTP POST request body means:
Key | Type | Description |
---|---|---|
| string | The name of the event |
| string | The type of the event, for example |
| string | The time the event occurred.
Example: |
| string | Unique id identifying this event |
| string | The ID of the device the identify call was performed on |
| optional string | An identifier that uniquely identifies the user that performed the event (usually email address) |
| optional string | For group events, a string that uniquely identifies the group this user belongs to (such as a company name). |
| object | Data about the page that the event was performed on |
| object | Data about the Freshpaint SDK that was used to capture this event |
| object | Any additional event properties for Track and Page events |
| object | Any additional properties of the user (for identify events) or group (for group events) |
Configuration Options
Integration Settings / Options
Freshpaint allows you to configure custom integration settings for Webhooks. To do this, navigate to Destinations > Apps > Webhooks and click "Configure" for Options.
This will open a modal where you can check the options you would like to enable and click "Save". The following options are available:
Enable Identify Events - By default, identify events are not sent to webhooks. Enable this option to send identify events to your webhook(s) with information about who your users are.
Enable Pageview Events - By default, pageview events are not sent to webhooks. Enable this option to send pageview events automatically collected by Freshpaint to your webhook(s). Note that this does not affect pageview events defined on the Event Library page.
Considerations
Each webhook must be accessible from the public internet.
When Freshpaint sends an event to a webhook, the service must respond within 5 seconds. After 5 seconds Freshpaint will record a timeout error.
If you configure multiple webhooks, Freshpaint will send the same events to each webhook. They must each respond within 5 seconds, otherwise Freshpaint will record a timeout error. Also, if the total time taken for all webhooks exceeds 25 seconds, Freshpaint will record a timeout error.
If you configure multiple webhooks, Freshpaint guarantees delivery to at least one webhook. This means that if Freshpaint successfully delivers an event to some of your webhooks but encounters an error with others, the delivery will not be retried. If Freshpaint encounters errors with all of the configured webhooks, the event will be retried later.
Last updated