Articles on: Website Widgets and Popups

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:


  1. 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":



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


Setting up the webhook


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

Was this article helpful?

Share your feedback

Cancel

Thank you!