From 87cff62ae3eacc4acaf9c0c5191fd4f8a499c1d5 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sun, 7 Jun 2026 18:26:15 -0300 Subject: [PATCH] add hidden UTM fields, capture from URL params, send in webhook --- index.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/index.html b/index.html index 97887ce..d594b44 100644 --- a/index.html +++ b/index.html @@ -1819,6 +1819,11 @@ + + + + + @@ -2343,6 +2348,15 @@ document.getElementById('pricing-period').addEventListener('change', updatePeriodDisplay); updatePeriodDisplay(); // fire on load so yearly bonuses show by default + /* ── Capture UTM params from URL ──────────────────────────── */ + (function () { + const params = new URLSearchParams(window.location.search); + ['source', 'medium', 'campaign', 'term', 'content'].forEach(function (key) { + const val = params.get('utm_' + key); + if (val) document.getElementById('utm_' + key).value = val; + }); + })(); + /* ── Hire Agent Webhook ───────────────────────────── */ const ORDER_WEBHOOK = "https://n8n.derez.ai/webhook/5318a0d8-d064-42fb-95b7-aa5552cb3fa9"; @@ -2362,6 +2376,11 @@ period: period, location: location, coupon: coupon || null, + utm_source: document.getElementById('utm_source').value || null, + utm_medium: document.getElementById('utm_medium').value || null, + utm_campaign: document.getElementById('utm_campaign').value || null, + utm_term: document.getElementById('utm_term').value || null, + utm_content: document.getElementById('utm_content').value || null, }), }); } catch (err) {