How a WhatsApp button works on a website
A WhatsApp button is just an anchor tag pointing to a `wa.me` URL. When a visitor taps it on mobile, the OS opens WhatsApp with the chat pre-addressed to your number. On desktop, WhatsApp Web opens instead. There's no API call, no form, no server-side handshake — it's a plain link. That simplicity is why you can add it without any plugin. It's also why tracking it requires something extra.
The gap between "button added" and "button working"
Once the button is live, you have no visibility into how often it gets clicked, which pages drive the most contacts, or whether a campaign brought visitors who converted. That information doesn't flow back automatically. WhatsLink FREE fills that gap: it intercepts clicks on `wa.me` links sitewide and logs each one in your WordPress database with source page, device type, and timestamp — no configuration per button required.
Building a WhatsApp button without any plugin
The only thing you need is a link. WhatsApp’s click-to-chat format is:
“` https://wa.me/PHONENUMBER “`
Replace `PHONENUMBER` with the full international number, no spaces, no dashes, no plus sign. An Italian number like +39 333 1234567 becomes `https://wa.me/393331234567`.
To pre-fill a message, add a query parameter:
“` https://wa.me/393331234567?text=Hello%2C%20I%20found%20your%20site “`
Encode spaces as `%20`. Keep the message short — it’s pre-filled, not sent automatically.
Adding the button in WordPress
In the block editor, the simplest approach is a **Button block**. Set the link to your `wa.me` URL and open it in a new tab. Done.
If you want a floating button (always visible as the user scrolls), add a Custom HTML block or edit your theme’s footer.php directly:
“`html WhatsApp “`
Style it with CSS in Appearance → Additional CSS. Position it fixed at bottom-right:
“`css .wa-float-btn { position: fixed; bottom: 20px; right: 20px; background: #25d366; color: white; padding: 12px 18px; border-radius: 50px; text-decoration: none; font-weight: 600; z-index: 9999; } “`
This works in any theme with no plugin involved.
Why you should still install WhatsLink FREE
Once the button is live, you have zero visibility into its performance. You won’t know:
- How many people click it per day
- Which pages generate the most WhatsApp contacts
- Whether mobile or desktop visitors click more
- Whether your button placement is working
WhatsLink FREE solves this automatically. Install the plugin — no configuration, no button modifications. It scans your pages for `wa.me` links and logs every click with the source page URL, device type, and timestamp. The data shows up in a simple dashboard under WordPress admin.
It works with any button you already have, including the one you just built manually. You don’t have to replace anything or add tracking code to individual buttons.
When to upgrade to WhatsLink PRO
If you run paid traffic (Google Ads, Meta Ads) and need to know which campaign drove each WhatsApp click, you need WhatsLink PRO. It captures UTM parameters server-side at the moment of click, before the browser switches to the WhatsApp app. The free version logs clicks; the PRO version logs which campaign, source, and medium generated each one.
For most sites starting out, WhatsLink FREE is the right first step. You get a real picture of click volume and page-level data, and you can decide whether attribution is worth the upgrade once you see actual numbers.
Read next
- WhatsApp Analytics: Track Website Clicks & Chat Stats
- How to Track WhatsApp Button Clicks in WordPress (No Code)
- Best WhatsApp Click Tracker Plugins for WordPress (2026)
- WhatsApp Link Click Rate: What's a Good CTR and How to Improve It
- WhatsLink FREE — Automatically Track Every Click
- A working WhatsApp button using a plain HTML link — no plugin needed
- The correct wa.me URL format with and without a pre-filled message
- Options for placing the button in posts, pages, or theme templates
- A free WordPress plugin that auto-tracks every WhatsApp click across your site
- Per-page click counts without touching Google Analytics or Tag Manager
FAQ
How do I create a WhatsApp link for a website button?
Use the wa.me format: https://wa.me/PHONENUMBER where PHONENUMBER is the full international number without spaces, dashes, or plus signs. For example, an Italian number +39 02 1234567 becomes https://wa.me/390212345678. You can add a pre-filled message with ?text=Your%20message. Wrap it in a standard anchor tag and you have a working WhatsApp button.
Do I need a plugin to add a WhatsApp button to WordPress?
No. A WhatsApp button is a plain HTML link with a wa.me URL. You can add it to any post, page, or widget using the WordPress block editor — just use a Button block or a Custom HTML block with an anchor tag. You only need a plugin if you want additional features like floating buttons, mobile-only visibility, or click tracking.
How do I track WhatsApp button clicks in WordPress?
Install WhatsLink FREE. It automatically detects any wa.me link across your site and logs every click with the source page URL, device type, and timestamp. No modifications to your existing buttons required. The click data appears in a dashboard under your WordPress admin menu.
Can I show the WhatsApp button only on mobile?
Yes. The simplest approach is CSS: add a class to your button element and use a media query to hide it on desktop. Most page builders (Elementor, Kadence, etc.) have visibility settings per device built in. WhatsLink FREE works regardless of whether the button is shown on all devices or mobile-only — it tracks any click that reaches the wa.me link.
What happens when someone clicks a WhatsApp button on desktop?
If the visitor has WhatsApp Desktop or WhatsApp Web open and linked to their phone, the chat opens there. If not, the browser redirects to web.whatsapp.com with a prompt to scan a QR code. This is standard WhatsApp behavior — it is not controlled by your website or plugin.
Can I add a WhatsApp button to my WordPress header or footer?
Yes. Go to Appearance → Theme File Editor and locate your header.php or footer.php template. Add the anchor tag with the wa.me URL where you want it to appear. Alternatively, most themes have a header/footer customization area in the Customizer or a block-based global template. Page builders usually have header and footer sections where you can add a Button block.