Webhooks
Last updated
Last updated
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.
Supports HIPAA mode
Connection Modes:
Web
Mobile
Server
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.
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:
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:
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:
When you call freshpaint.group("Acme, Inc", {"companyId": "1234"})
, the body of the HTTP POST request sent to each webhook will look like this:
Here is what each piece of the HTTP POST request body means:
event
string
The name of the event
type
string
The type of the event, for example "track"
, "identify"
, "page"
, or "group"
timestamp
string
The time the event occurred.
Example: "2022-08-08T17:15:45Z"
messageId
string
Unique id identifying this event
anonymousId
string
The ID of the device the identify call was performed on
userId
optional string
An identifier that uniquely identifies the user that performed the event (usually email address)
groupId
optional string
For group events, a string that uniquely identifies the group this user belongs to (such as a company name).
context.page
object
Data about the page that the event was performed on
context.library
object
Data about the Freshpaint SDK that was used to capture this event
properties
object
Any additional event properties for Track and Page events
traits
object
Any additional properties of the user (for identify events) or group (for group events)
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.
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.