- Templates
- Practitioner
- Marketers
- Developers
Dynamic URL Button
Also called: Dynamic CTA link · Variable URL button · Personalised URL button · URL button with {{1}}
A template URL button whose link ends in a variable, so each recipient's tap opens their own page: an order, a booking, an invoice or a tracked landing page.
Reviewed
What is a dynamic URL button?
A dynamic URL button is a call-to-action button on a WhatsApp message template whose link is completed at send time. When you create the template you give the button a label of up to 25 characters and a URL with one variable at the very end, such as https://www.example.com/track/{{1}}, plus an example value so reviewers can see a real destination. When you send it, you pass only the suffix — ORD48213 — and each customer's button opens their own link.
The rest of the URL is fixed at approval. The variable is appended to the end of the approved string, so the scheme, domain and path before it cannot change from one send to the next; that is what lets Meta review the destination once and lets customers trust where the button goes. The whole URL can be up to 2,000 characters, a template can carry at most two URL buttons, and each URL can contain only one variable. A static URL button, by contrast, sends every recipient to the same address.
Meta asks that send-time values containing special characters be percent-encoded first: a space becomes %20, a colon %3A, a pipe %7C, and non-ASCII characters such as Hindi text become their UTF-8 percent codes. Unencoded characters can make the send fail. Because taps leave WhatsApp and open the customer's browser, no webhook reports them; you measure clicks with the URL itself (unique suffixes, UTM tags, a redirect you control) and with the button-click metrics in template analytics.
Key takeaways
- A dynamic URL button is a template call-to-action button whose link ends in one variable, completed per recipient at send time.
- The variable must be the last part of the URL; everything before it is fixed when Meta approves the template.
- A URL can be up to 2,000 characters, and a template can carry at most two URL buttons.
- Percent-encode special characters in the suffix, and use opaque tokens rather than phone numbers or email addresses.
- Taps open the browser and fire no webhook, so measure clicks through the link itself and template analytics.
Interactive stop
Will this suffix survive the URL?
A URL can only carry a small set of characters; everything else travels as %XX bytes.
Try spaces, &, ?, # or ₹.
- Characters in
- 9
- Characters out
- 9
- Nothing needed escaping — every character is URL-safe already.
How does a dynamic URL button work?
Design the fixed part of the URL
Put everything that never changes before the variable, including fixed UTM tags:
https://www.example.com/o?utm_source=whatsapp&utm_medium=template&ref={{1}}. The variable must be the last thing in the URL.Add the button with an example
In the template's BUTTONS component add
{ "type": "URL", "text": "Track order", "url": "…/{{1}}", "example": ["…/ORD48213"] }. The example must be a realistic full URL.Generate the suffix per recipient
Your system builds the value for each send: an order ID, a short token, a booking reference. Prefer short opaque tokens over raw personal data.
Encode and send
Percent-encode the value, then add a button component with
sub_type: url, the button'sindex(its position among the template's buttons) and onetextparameter holding the suffix.Measure the clicks
Read clicks from template analytics and from your own redirect or analytics tool. Join them to the message ID you stored at send time to see which message drove which visit.
A dynamic URL button in code
{"type": "BUTTONS","buttons": [{"type": "URL","text": "Track order","url": "https://www.example.com/t/{{1}}","example": ["https://www.example.com/t/K7Q2M9XA"]}]}
One variable, at the end of the URL, with a full example URL for review.
Example: Delivery tracking for a Kochi grocery chain
A Kochi grocery chain sends an order_dispatched utility template whose "Track order" button points to https://www.example.com/t/{{1}}. For each order the backend creates a random eight-character token, stores it against the order and sends only the token as the button value, so no phone number or name ever appears in a URL. Tapping opens a tracking page with the rider's live location. The token also tells the chain which message was tapped: 61% of delivered dispatch messages were clicked in the first month, and orders whose links went untapped generated most of the "where is my order" calls.
A dynamic URL button: key facts and limits
- Variables per URL
- 1, at the end of the URL
- URL length
- Up to 2,000 characters
- Button label
- Up to 25 characters
- URL buttons per template
- Up to 2
- Send component
- type button, sub_type url, one text parameter
- Click webhooks
- None: taps open the browser
Common mistakes with a dynamic URL button
Putting the variable in the middle
A URL like
https://www.example.com/{{1}}/detailsis not allowed: the variable is appended to the end. Move fixed paths and UTM tags before the variable.Sending unencoded values
Spaces, colons, pipes and non-ASCII characters in the suffix can make the send fail. Percent-encode the value in code before it goes into the parameter.
Putting personal data in the link
A suffix such as a phone number or email address ends up in browser history, analytics tools and server logs. Use a random token that your server maps to the record.
Expecting a tap webhook
URL taps leave WhatsApp, so nothing arrives on your webhook. Plan measurement through the link and template analytics, or use a quick reply when you need an in-chat signal.
Best practices for a dynamic URL button
- Use a short redirect path you control (
/r/{{1}}) so you can change the final destination without re-approving the template. - Give each carousel card or campaign variant its own suffix to compare clicks.
- Expire tokens that unlock personal pages, such as invoices, after a sensible period.
- Check the full rendered URL stays under 2,000 characters once the longest suffix is added.
Why does a dynamic URL button matter?
A single approved template with a dynamic button replaces thousands of per-customer links you could never get approved one by one. For utility messages it takes the customer straight to the order, booking or invoice the message is about — no login hunt — and for marketing it turns every tap into an attributable click, because the suffix can identify the campaign, the variant and even the recipient. It is the main bridge between a WhatsApp message and the web or app journey that completes the sale.
Dynamic URL Button FAQs
Can the variable replace the whole URL or the domain?+
How do I add UTM parameters to a dynamic URL button?+
Is a dynamic URL button the same as a CTA button?+
Why does my dynamic URL button send fail?+
Talk to InfiQ
From definition to your first message
InfiQ is an official Meta Business Partner. Start a 7-day free trial — no card needed — and see this running on your own number.