docs: explain how to track clicks on HSM Dynamic URL buttons#642
docs: explain how to track clicks on HSM Dynamic URL buttons#642SangeetaMishr wants to merge 3 commits into
Conversation
WhatsApp doesn't send Glific any event when a contact taps a URL button, so there's no built-in click count. Document the workaround: route the Dynamic URL through a per-contact tracking/redirect link, and use Quick Reply buttons instead when the flow itself needs to react to the tap. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughUpdated the HSM Templates documentation’s last-updated date to July 2026. Added guidance explaining that WhatsApp does not report URL button taps to Glific, recommending dynamic URLs with tracking or redirect layers, describing unique-value matching for recorded clicks, and suggesting Quick Reply buttons when engagement must trigger flow logic. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🚀 Deployed on https://deploy-preview-642--glific-docs.netlify.app |
Bump Last Updated to July 2026, drop the bold heading and note admonition on the new section in favor of plain prose matching the rest of the page. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
@Fawas003 Can you please review this. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/4`. Product Features/06. HSM Templates.md:
- Line 150: Update the documentation sentence about matching recorded clicks to
contacts so it says “clicked” rather than “opened,” specifically describing
which contacts clicked the link without implying the destination page was opened
or consumed.
- Around line 148-149: Update the tracking-link guidance near the dynamic URL
example to recommend an opaque random or signed token mapped server-side instead
of a raw contact ID. Explicitly caution against placing contact identifiers or
other PII in URLs, while preserving the redirect and click-tracking workflow.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 4ef50f69-e20d-4839-a00d-cbf1d740449c
📒 Files selected for processing (1)
docs/4. Product Features/06. HSM Templates.md
| - 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}}` | ||
| - 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. |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Avoid putting a raw contact ID in the tracking URL.
This can expose a stable user identifier in browser history, request logs, and third-party tracking analytics. Recommend an opaque, random or signed token mapped server-side, and explicitly caution against including PII in the URL.
Proposed wording
-- 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}}`
+- Use a Dynamic URL with an opaque, non-PII token mapped to the contact server-side: `https://yourdomain.org/track/{{1}}`📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - 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}}` | |
| - 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. | |
| - Use a Dynamic URL with an opaque, non-PII token mapped to the contact server-side: `https://yourdomain.org/track/{{1}}` | |
| - 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. |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/4`. Product Features/06. HSM Templates.md around lines 148 - 149,
Update the tracking-link guidance near the dynamic URL example to recommend an
opaque random or signed token mapped server-side instead of a raw contact ID.
Explicitly caution against placing contact identifiers or other PII in URLs,
while preserving the redirect and click-tracking workflow.
|
|
||
| - 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}}` | ||
| - 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. | ||
| - Match the recorded clicks back to your contacts using the unique value, to see who opened the link. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Say “clicked,” not “opened.”
A redirect records a click/request; it does not prove that the destination page was opened or consumed. Change this to “see which contacts clicked the link.”
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/4`. Product Features/06. HSM Templates.md at line 150, Update the
documentation sentence about matching recorded clicks to contacts so it says
“clicked” rather than “opened,” specifically describing which contacts clicked
the link without implying the destination page was opened or consumed.
Summary
Fixes #265
Adds a "Tracking clicks on a URL button" section right after the Dynamic URL example in the HSM Templates doc, explaining:
Verification
Confirmed against
glific/glific:lib/glific_web/providers/gupshup/router.exonly routes an inboundbutton_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.Test plan
:::noteadmonition correctlySummary by CodeRabbit