Studio Example
A fictional design studio. The chat asks for the visitor's phone number and sends the request to the studio by e-mail before WhatsApp opens. So no request gets lost, even if the visitor does not send the message in WhatsApp.
Example 4: Optional e-mail notification
The widget itself needs no server. If you want an e-mail for every message, upload the add-on
whatsapp-notify.php
to your own web server (PHP 8.1+), enter your e-mail address and point the widget to it:
<script src="/js/whatsapp-widget.js"
data-phone="+49 000 0000000"
data-name="Studio Example"
data-welcome="Hello! Tell us about your project.|We usually reply within a day."
data-notify-url="/whatsapp-notify.php"
data-privacy-url="/privacy"
defer></script>
data-notify-url: “Send” posts the message to this URL and then opens WhatsApp.- With
data-notify-url, the chat asks for the visitor's phone number (required by default). If WhatsApp Web is not set up on the visitor's computer, you still get the message and can call back. The e-mail contains a link to reply on WhatsApp. Usedata-ask-phone="optional"or"false"to change this. - The phone field starts with
+49; the number must be international. Usedata-country-code="+43"for another country. - The privacy notice in the chat changes automatically: it says that message and phone number go to you by
e-mail. Link your privacy policy with
data-privacy-url.
This demo does not send e-mails. The small log in the bottom left corner shows the request instead of sending it.
The e-mail you receive
Subject: New message via the WhatsApp widget
New message via the WhatsApp widget
Hello, we need a new logo for our bakery.
---
Phone: +49 176 123 456 78
Reply on WhatsApp: https://wa.me/4917612345678
Page: https://www.example.com/services
Time: 2026-09-25 17:52:20 CEST
Privacy
With the add-on, the message leaves the browser before WhatsApp opens: it goes to your server and to your mailbox. The add-on stores nothing and writes no logs, but your web server may log the request (without the message, because it is sent as POST). Mention this in your privacy policy.