Skip to content

Commit 37bc55f

Browse files
SangeetaMishrsangeeta1911claude
authored
docs: explain how to track clicks on HSM Dynamic URL buttons (#642)
## Summary Fixes #265 Adds a "Tracking clicks on a URL button" section right after the Dynamic URL example in the HSM Templates doc, explaining: - Why Glific can't show click counts for Static/Dynamic URL buttons: WhatsApp never sends an event back to Glific when a contact taps a URL button (unlike Quick Reply buttons, whose taps come back as a message). - The workaround: embed a unique per-contact value in the Dynamic URL and route it through a redirect/link-tracking service that logs the click before forwarding the contact to the real destination. - A pointer to use Quick Reply buttons instead, if the flow itself needs to branch on whether the contact engaged. ## Verification Confirmed against `glific/glific`: - `lib/glific_web/providers/gupshup/router.ex` only routes an inbound `button_reply` (Quick Reply) webhook to the message controller — there is no equivalent inbound route/handler for CTA/URL button taps, so Glific never learns a URL button was tapped. - This matches the existing caveat already in this same doc file ("clicks on this button won't be recorded, as the link opens outside and does not send a response back to the flow"), which this PR generalizes into concrete guidance. ## Test plan - [ ] Docs site renders the new section and `:::note` admonition correctly - [ ] Reviewer confirms this matches what's told to orgs on Discord/support <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated the HSM Templates documentation date. * Added guidance on tracking URL button clicks: WhatsApp doesn’t report URL taps back, so use dynamic URLs with a tracking/redirect layer to record clicks. * Clarified that for flow logic reacting to engagement, Quick Reply buttons should be used since they return responses to the flow. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: sangeeta1911 <[email protected]> Co-authored-by: Claude Sonnet 5 <[email protected]>
1 parent 0a7d120 commit 37bc55f

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎docs/4. Product Features/06. HSM Templates.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,18 @@ Session Window - A session window refers to the 24-hour period following a user'
112112

113113
<img width="" height="496" alt="Screenshot 2026-07-24 at 1 30 48 PM" src="https://github.com/user-attachments/assets/ce900945-aa7b-4d28-b4c2-ffe5c0446791" />
114114

115+
Tracking clicks on a URL button
116+
117+
WhatsApp does not send any signal back to Glific when a contact taps a URL button - the button simply opens the link on the contact's phone. Because of this, Glific has no way to show you how many contacts clicked a Static or Dynamic URL button.
118+
119+
To track clicks yourself, don't point the button straight at your destination page. Instead:
120+
121+
- Use a Dynamic URL to add a unique value for each contact to the link, for example the contact's ID: `https://yourdomain.org/track/{{1}}`
122+
- Point this link to a redirect page you control, or a link-tracking tool (such as Bitly or Rebrandly), that records every click along with that unique value before sending the contact on to your real destination page.
123+
- Match the recorded clicks back to your contacts using the unique value, to see who opened the link.
124+
125+
Please Note : If you need the flow itself to react to whether a contact engaged (for example, to send a different follow-up message), use Quick Reply buttons instead of a URL button. Unlike URL buttons, Quick Reply taps send a response back into the flow and can be captured with a `Wait for Response` node.
126+
115127
**WhatsApp Form:** WhatsApp form type buttons can be used to link the WhatsApp forms created and published with Meta.
116128

117129
h. `Attachment type` - Select the attachment type to send an attachment in your HSM template message Ex. Image, Audio, Video, etc.

0 commit comments

Comments
 (0)