Webhooks
Creating the webhook
In Personizely you can set up a webhook to be sent when a certain action is done on a widget. To create a webhook for a widget, follow the guide below:
Edit the element on which you want to attach a webhook, select "Interaction" in the right sidebar menu, and in the Automation section click "Add action":

Select " Send webhook" and then set the URL where you want to direct the hook:

You're all set, now Personizely will send a HTTP request to the URL provided once someone submits/click on the edited form/element:
Receiving the webhook
The webhooks are send using a POST request with a JSON payload which your script should parse and then return a 200 HTTP status.
Webhook's JSON format is the following:
{
"widgetId": Number,
"event": String - click/submit,
"visitorData": Object {
"firstName": String,
"lastName": String,
"email": String,
"companyName": String,
"companyTItle": String,
"phone": String,
"address": String,
"marketingConsent": Boolean,
"privacyContent": Boolean,
"bio": String,
"initialReferrer": String,
"utmSource": String,
"utmCampaign": String,
"utmContent": String,
"utmTerm": String,
"utmMedium": String,
"entryPage": String,
"firstVisitDate": String,
"country": String,
"city": String,
"region": String,
"postalCode": String,
Number: String - Custom fields are serialized with the custom field id as the key
}
}
Updated on: 04/02/2025
Thank you!