Webhook Data Format

The Click to Chat plugin supports webhook integration to send event data such as button clicks and form submissions to external applications or services.

By default, the webhook data is sent as a Stringify JSON object.

However, if your integration requires the data to be sent in Standard JSON format, you can easily configure this from the plugin settings.

https://www.w3schools.com/js/js_json_stringify.asp

Changing the Webhook Data Format

Go to Click to ChatOther Settings – Advanced Settings – Webhook Data Format.

  • String – Sends the webhook data as a JSON string (default).
  • JSON – Sends the webhook data in standard JSON format for applications that require structured data.

Purpose of Webhooks

Webhooks in the Click to Chat plugin are primarily used for analytics and automation. They allow you to:

  • Track user interactions by capturing clicks on the WhatsApp icon.
  • Collect form input from users who submit the Greetings Form before initiating a chat.

Choosing the correct data format for your webhook ensures seamless integration with third-party platforms. If your analytics or automation tools expect structured JSON data, switch the webhook data format to JSON in the Advanced Settings.