From 2a2d8f1e72d9d80be91ea768f0316a491af64797 Mon Sep 17 00:00:00 2001
From: le king fu
Date: Mon, 2 Nov 2026 21:57:15 -0500
Subject: [PATCH] feat: label the product page links with a fixed UTM per
button (#525)
purchaseUrl(language, link) now appends utm_source=app, utm_medium=desktop,
utm_campaign=simpl-resultat and utm_content=, built by URLSearchParams
in that order. `link` is the closed type ProductPageLink: locked-module,
license-card, update-locked, update-locked-download. The path and the choice
of the language do not change: the path stays the contract with the site.
PurchaseButton takes a required `link` ("locked-module" | "update-locked"):
UpsellGate passes locked-module, UpdateCard and ErrorPage update-locked.
DownloadLatestButton takes no label and always opens update-locked-download.
The License card opens license-card.
Co-Authored-By: Claude Opus 5.5
---
src/components/settings/LicenseCard.tsx | 2 +-
src/components/settings/UpdateCard.tsx | 5 ++-
.../shared/DownloadLatestButton.tsx | 9 ++---
src/components/shared/ErrorPage.tsx | 2 +-
src/components/shared/PurchaseButton.tsx | 21 +++++++----
src/components/shared/UpsellGate.tsx | 2 +-
src/shared/purchaseUrl.ts | 36 +++++++++++++++----
7 files changed, 55 insertions(+), 22 deletions(-)
diff --git a/src/components/settings/LicenseCard.tsx b/src/components/settings/LicenseCard.tsx
index 3c10bad..1a3aae4 100644
--- a/src/components/settings/LicenseCard.tsx
+++ b/src/components/settings/LicenseCard.tsx
@@ -56,7 +56,7 @@ function LicenseCardBody() {
};
const handlePurchase = () => {
- void openUrl(purchaseUrl(i18n.language)).catch((e) =>
+ void openUrl(purchaseUrl(i18n.language, "license-card")).catch((e) =>
logError("Product page: openUrl failed", e),
);
};
diff --git a/src/components/settings/UpdateCard.tsx b/src/components/settings/UpdateCard.tsx
index 7613617..444d095 100644
--- a/src/components/settings/UpdateCard.tsx
+++ b/src/components/settings/UpdateCard.tsx
@@ -94,7 +94,10 @@ export default function UpdateCard() {
)}
-
+
diff --git a/src/components/shared/DownloadLatestButton.tsx b/src/components/shared/DownloadLatestButton.tsx
index 0367765..d58c8dd 100644
--- a/src/components/shared/DownloadLatestButton.tsx
+++ b/src/components/shared/DownloadLatestButton.tsx
@@ -15,9 +15,10 @@ interface DownloadLatestButtonProps {
/**
* "Download the latest version", shown in the free edition where automatic updates
* are locked (issue #346). It opens the product page, which serves the latest
- * installers directly (la-compagnie-maximus#153). No update check runs here: the
- * free edition makes no network call for updates. A failure to open the browser
- * is logged, like PurchaseButton's.
+ * installers directly (la-compagnie-maximus#153), always labelled
+ * `update-locked-download` (#525): the update card and the error page share it. No
+ * update check runs here: the free edition makes no network call for updates. A
+ * failure to open the browser is logged, like PurchaseButton's.
*/
export default function DownloadLatestButton({
className = DEFAULT_LAYOUT,
@@ -27,7 +28,7 @@ export default function DownloadLatestButton({