Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

fix(site): preserve campaign source into checkout

purplebc8dcc085205
diff --git a/docs/assets/lu.js b/docs/assets/lu.js
index 5226a0ba..f51c8ed5 100644
--- a/docs/assets/lu.js
+++ b/docs/assets/lu.js
@@ -146,6 +146,24 @@
});
}
+ // Preserve a validated campaign source when a visitor crosses from the
+ // editorial LUC site to LU Labs. Static pricing links carry a useful default
+ // (`luc-pricing`), but an inbound campaign such as `m300_w1_a` must win so the
+ // eventual Stripe checkout can still be attributed after login.
+ function wireFunnelSource() {
+ var source = new URLSearchParams(window.location.search).get("src");
+ if (!source || !/^[a-z0-9_-]{1,32}$/.test(source)) return;
+
+ var links = document.querySelectorAll('a[href^="https://lu-labs.ai/"]');
+ for (var i = 0; i < links.length; i++) {
+ try {
+ var target = new URL(links[i].href);
+ target.searchParams.set("src", source);
+ links[i].href = target.toString();
+ } catch (e) {}
+ }
+ }
+
// ── Language toggle (EN ↔ DE, client-side via Google Translate) ──────
var LANG_KEY = "lu-lang";
var FLAG_DE = '<svg viewBox="0 0 60 40" aria-hidden="true"><rect width="60" height="40" fill="#000"/><rect y="13.4" width="60" height="13.3" fill="#D00"/><rect y="26.7" width="60" height="13.3" fill="#FFCE00"/></svg>';
@@ -208,7 +226,7 @@
injectAmbient();
var monos = document.querySelectorAll("[data-mono]");
for (var i = 0; i < monos.length; i++) buildMono(monos[i]);
- wireTheme(); wireNav(); wireScrollArrow(); wireLang();
+ wireTheme(); wireNav(); wireScrollArrow(); wireFunnelSource(); wireLang();
}
if (document.readyState === "loading") document.addEventListener("DOMContentLoaded", init);