From 9fb6fab88e3671b28b04e0507a3aa5facacca4c7 Mon Sep 17 00:00:00 2001 From: louispaulb Date: Fri, 22 May 2026 09:22:12 -0400 Subject: [PATCH] feat(campaigns): distinguish gift-CTA click from generic email click MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mailjet's click event includes the actual URL the recipient clicked. We previously bumped every click — CTA button, mailto support, footer link — to status='clicked' indiscriminately. Now we additionally flag clicks on the Giftbit shortlink (matched by r.gift_url prefix, fallback to gft.link or giftbit.com host) as the high-signal "gift_link_clicked" event. Adds: - recipient.gift_link_clicked (bool) + gift_clicked_at (ISO timestamp), set on first matching click; later non-gift clicks don't unset - counters.gift_clicked aggregated alongside existing status counters - "Cadeau cliqué" counter card on detail page (deep-purple, redeem icon) - 🎁 redeem icon next to status chip when the recipient engaged - CSV report: new gift_link_clicked + gift_clicked_at columns Why this matters: "opened" is noisy (Apple Mail Privacy Protection, image proxies prefetch). A click on the CTA is the only reliable indicator that the offer landed and the recipient is engaging. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.7 --- .../campaigns/pages/CampaignDetailPage.vue | 19 +++++++- services/targo-hub/lib/campaigns.js | 43 ++++++++++++++++--- 2 files changed, 56 insertions(+), 6 deletions(-) diff --git a/apps/ops/src/modules/campaigns/pages/CampaignDetailPage.vue b/apps/ops/src/modules/campaigns/pages/CampaignDetailPage.vue index cfa1836..c49ee03 100644 --- a/apps/ops/src/modules/campaigns/pages/CampaignDetailPage.vue +++ b/apps/ops/src/modules/campaigns/pages/CampaignDetailPage.vue @@ -28,7 +28,21 @@
{{ counterFor('clicked') }}
-
Cliqués
+
+ Cliqués + + Tous liens confondus (CTA, support, footer…) + +
+
+ +
🎁 {{ campaign.counters?.gift_clicked || 0 }}
+
+ Cadeau cliqué + + Le destinataire a cliqué le bouton CTA / lien Giftbit — signal d'engagement réel avec l'offre + +
{{ counterFor('queued') }}
@@ -60,6 +74,9 @@