Marketing skills for Claude Code and AI agents. CRO, copywriting, SEO, analytics, and growth engineering.
JavaScript agent-skillsai-agentsai-seoclaudeclaude-codeclaude-code-pluginclaude-skillscodexcontent-marketingconversion-rate-optimizationcopywritingcursoremail-marketinggenerative-engine-optimizationgrowth-marketingmarketingmarketing-automationsaas-marketingseoskill-md
feat(conversion-tracking): add Squarespace Forms detection
Aaron Beashel7bc7dc08fc75
diff --git a/skills/conversion-tracking/SKILL.md b/skills/conversion-tracking/SKILL.mdindex af96573..1b07e58 100644--- a/skills/conversion-tracking/SKILL.md+++ b/skills/conversion-tracking/SKILL.md@@ -157,7 +157,7 @@ Load a reference when the task reaches it. Nothing here is optional reading, it'| The audit's evidence procedure, scoring, and report template | `references/audit-playbook.md` || Why the numbers never match, loss magnitudes, and the refund asymmetry | `references/discrepancies.md` |-Assets: [`assets/snippets/`](assets/snippets/README.md) holds paste-in success detectors for 18 lead-gen tools, plus four universal patterns for the moments no form tool owns: phone call clicks (the most under-tracked conversion in local services), file downloads, thank-you page arrivals, and a generic AJAX success pattern. [`assets/gtm-recipes/`](assets/gtm-recipes/README.md) holds the importable GTM containers (detection and send, with event names in [`event-map.json`](assets/gtm-recipes/event-map.json)), and `scripts/build_recipe.py` merges them with the user's IDs into one import file.+Assets: [`assets/snippets/`](assets/snippets/README.md) holds paste-in success detectors for 19 lead-gen tools, plus four universal patterns for the moments no form tool owns: phone call clicks (the most under-tracked conversion in local services), file downloads, thank-you page arrivals, and a generic AJAX success pattern. [`assets/gtm-recipes/`](assets/gtm-recipes/README.md) holds the importable GTM containers (detection and send, with event names in [`event-map.json`](assets/gtm-recipes/event-map.json)), and `scripts/build_recipe.py` merges them with the user's IDs into one import file.## Boundariesdiff --git a/skills/conversion-tracking/assets/gtm-recipes/README.md b/skills/conversion-tracking/assets/gtm-recipes/README.mdindex 78393e8..ee5c7d7 100644--- a/skills/conversion-tracking/assets/gtm-recipes/README.md+++ b/skills/conversion-tracking/assets/gtm-recipes/README.md@@ -1,10 +1,10 @@# GTM recipes-Importable Google Tag Manager containers that produce one import-ready file per tool and destination, no manual tag building (22 detectors x 6 destinations).+Importable Google Tag Manager containers that produce one import-ready file per tool and destination, no manual tag building (23 detectors x 6 destinations).## The 2 layers-**`detect/` (22 recipes, ready to import as-is).** Each contains a listener tag that detects one tool's conversion moment (form submitted, meeting booked) and pushes a canonical dataLayer event, plus a custom event trigger on that event and dataLayer variables for the form or booking ID. The event names are listed in `../snippets/README.md` and in `event-map.json`.+**`detect/` (23 recipes, ready to import as-is).** Each contains a listener tag that detects one tool's conversion moment (form submitted, meeting booked) and pushes a canonical dataLayer event, plus a custom event trigger on that event and dataLayer variables for the form or booking ID. The event names are listed in `../snippets/README.md` and in `event-map.json`.**`send/` (6 templates, need values filled in before import).** Each contains the tag that actually records the conversion, wired to a placeholder trigger:diff --git a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-squarespace-forms.json b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-squarespace-forms.jsonnew file mode 100644index 0000000..bbf1c3e--- /dev/null+++ b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-squarespace-forms.json@@ -0,0 +1,122 @@+{+ "exportFormatVersion": 2,+ "exportTime": "2026-10-15 00:00:00",+ "containerVersion": {+ "path": "accounts/0/containers/0/versions/0",+ "accountId": "0",+ "containerId": "0",+ "containerVersionId": "0",+ "container": {+ "path": "accounts/0/containers/0",+ "accountId": "0",+ "containerId": "0",+ "name": "Conversion Detection - Squarespace Forms",+ "publicId": "GTM-XXXXXXX",+ "usageContext": [+ "WEB"+ ],+ "fingerprint": "0",+ "tagManagerUrl": "https://tagmanager.google.com/#/container/accounts/0/containers/0/workspaces/0"+ },+ "tag": [+ {+ "accountId": "0",+ "containerId": "0",+ "tagId": "1",+ "name": "Conversion Detection - Squarespace Forms Submission Listener",+ "type": "html",+ "parameter": [+ {+ "type": "TEMPLATE",+ "key": "html",+ "value": "<script>\n(function () {\n 'use strict';\n // Install once, even if GTM injects this tag more than once on the page.\n if (window.__ctDetectSquarespaceForms) return;\n window.__ctDetectSquarespaceForms = true;\n window.dataLayer = window.dataLayer || [];\n\n // Ported from a production module (cdn/v1/modules/\n // squarespace-forms.js, measured against a live Squarespace 7.1 site in\n // October 2026). Event only: it never reads what the visitor typed.\n //\n // What Squarespace does:\n // - The Form block renders a React form in the page (no iframe):\n // .sqs-block-form ... form.react-form-contents[novalidate]. It mounts\n // after DOMContentLoaded, so submits are caught on document.\n // - There is no check in the browser. Every submit posts\n // /api/form/FormSubmissionKey then /api/form/SaveFormSubmission, and the\n // server decides: 204 on success, 400 for a field error, 401 for a failed\n // reCAPTCHA. A submit is never a conversion on its own.\n // - On success it marks the form (react-form-contents--submitted), shows a\n // .form-submission-text message and gives the button the class\n // \"success\". A form set to redirect leaves for its page about 1.3\n // seconds after the 204, before that message renders in Chromium.\n // - The Newsletter block posts to the same SaveFormSubmission address, and\n // that request carries no form identity, so a save only counts for a\n // form that provably owns it.\n //\n // It fires once per form, on the first confirmed success for an attempt:\n // 1. a success marker that was not there when the attempt started, or\n // 2. the SaveFormSubmission request answering 2xx (read from the\n // browser's resource timing, where it exposes responseStatus), when\n // no other form was submitted around it, or\n // 3. as the page leaves (a redirect form), either of the above.\n // It never fires on a 400 or 401, on a filled anti-spam field, or when it\n // cannot tell which form a save belongs to.\n\n var EVENT_NAME = 'squarespace_form_submitted';\n var BLOCK_SELECTOR = '.sqs-block-form, [data-sqsp-block=\"form\"], [data-definition-name=\"website.components.form\"]';\n var SAVE_PATH = '/api/form/SaveFormSubmission';\n // Long enough for a visitor to solve a reCAPTCHA picture challenge.\n var WATCH_MS = 180000;\n // A submit this soon before an attempt, still unanswered, makes the next\n // save ambiguous.\n var LOOKBACK_MS = 5000;\n\n function now() {\n try {\n if (window.performance && typeof window.performance.now === 'function') return window.performance.now();\n } catch (e) {}\n return 0;\n }\n\n function hasToken(el, token) {\n if (!el || !el.getAttribute) return false;\n var cls = el.getAttribute('class') || '';\n return (' ' + cls + ' ').indexOf(' ' + token + ' ') !== -1;\n }\n\n function isConnected(el) {\n try {\n if (typeof el.isConnected === 'boolean') return el.isConnected;\n return !!(el.ownerDocument && el.ownerDocument.documentElement.contains(el));\n } catch (e) {\n return false;\n }\n }\n\n // ---- Which forms are Squarespace forms ----\n\n function blockFor(formEl) {\n try {\n return (formEl && formEl.closest) ? formEl.closest(BLOCK_SELECTOR) : null;\n } catch (e) {\n return null;\n }\n }\n\n function isSquarespaceForm(formEl) {\n if (!formEl || (formEl.tagName || '').toLowerCase() !== 'form') return false;\n return !!blockFor(formEl);\n }\n\n // The block's own form definition (the site owner's settings, not the\n // visitor's answers): { formId, formName, ... }.\n function formIdentity(block) {\n var id = { formId: '', formName: '' };\n try {\n var script = block && block.querySelector('script.sqs-form-block-context');\n if (!script) return id;\n var parsed = JSON.parse(script.textContent || '{}');\n if (parsed && typeof parsed.formId === 'string') id.formId = parsed.formId;\n if (parsed && typeof parsed.formName === 'string') id.formName = parsed.formName;\n } catch (e) {}\n return id;\n }\n\n // The honeypot is a text input visitors cannot see or reach (measured id\n // \"message-field\", inside an aria-hidden wrapper). Squarespace answers a\n // filled one with a 204 and its thank-you message, so a filled honeypot\n // means a bot. Only whether it is empty is checked.\n function honeypotFilled(formEl) {\n try {\n var hp = formEl.querySelector('#message-field');\n if (!hp) return false;\n var wrap = hp.closest && hp.closest('[aria-hidden=\"true\"]');\n if (!wrap || !formEl.contains(wrap)) return false;\n return hp.value !== '';\n } catch (e) {\n return false;\n }\n }\n\n function submitButtonOf(formEl) {\n try { return formEl.querySelector('button[type=\"submit\"]'); } catch (e) { return null; }\n }\n\n // ---- Which form a save request belongs to ----\n\n var seenSaves = []; // SaveFormSubmission resource entries seen so far\n var claimed = []; // entries already credited to a form\n var submitLog = []; // every form submit on the page, with its time\n\n function pageOrigin() {\n try {\n var l = window.location;\n return l.origin || (l.protocol + '//' + l.host);\n } catch (e) {\n return '';\n }\n }\n\n // The save request's address is checked for its origin and path only.\n function isSaveEntry(e) {\n var n = (e && e.name) || '';\n var origin = pageOrigin();\n if (!origin || n.indexOf(origin + '/') !== 0) return false;\n return n.slice(origin.length).split(/[?#]/)[0] === SAVE_PATH;\n }\n\n function prune() {\n var cutoff = now() - (WATCH_MS + LOOKBACK_MS);\n var i;\n for (i = submitLog.length - 1; i >= 0; i--) if (submitLog[i].at < cutoff) submitLog.splice(i, 1);\n for (i = seenSaves.length - 1; i >= 0; i--) if (seenSaves[i].startTime < cutoff) seenSaves.splice(i, 1);\n if (seenSaves.length > 100) seenSaves.splice(0, seenSaves.length - 100);\n if (claimed.length > 100) claimed.splice(0, claimed.length - 100);\n }\n\n function allSaveEntries() {\n var all = seenSaves.slice();\n try {\n if (window.performance && typeof window.performance.getEntriesByType === 'function') {\n var buffered = window.performance.getEntriesByType('resource');\n for (var b = 0; b < buffered.length; b++) if (all.indexOf(buffered[b]) === -1) all.push(buffered[b]);\n }\n } catch (err) {}\n var out = [];\n for (var i = 0; i < all.length; i++) if (isSaveEntry(all[i])) out.push(all[i]);\n return out;\n }\n\n function saveEntriesSince(since) {\n var all = allSaveEntries();\n var out = [];\n for (var i = 0; i < all.length; i++) {\n if (all[i].startTime >= since && claimed.indexOf(all[i]) === -1) out.push(all[i]);\n }\n out.sort(function (x, y) { return x.startTime - y.startTime; });\n return out;\n }\n\n // Another form (a Newsletter block included) submitted during this\n // attempt, or just before it without its own save yet, makes a save\n // ambiguous.\n function saveOwnershipAmbiguous(formEl, since, until) {\n var saves = null;\n for (var i = 0; i < submitLog.length; i++) {\n var s = submitLog[i];\n if (s.form === formEl || s.at > until) continue;\n if (s.at >= since) return true;\n if (s.at >= since - LOOKBACK_MS) {\n if (!saves) saves = allSaveEntries();\n var answered = false;\n for (var j = 0; j < saves.length; j++) {\n if (saves[j].startTime >= s.at && saves[j].startTime < since) { answered = true; break; }\n }\n if (!answered) return true;\n }\n }\n return false;\n }\n\n function statusOf(entry) {\n var s = entry && entry.responseStatus;\n return (typeof s === 'number' && s > 0) ? s : null;\n }\n\n // ---- One watcher per form ----\n\n var watchers = [];\n var firedForms = [];\n\n function findWatcher(formEl) {\n for (var i = 0; i < watchers.length; i++) if (watchers[i].form === formEl) return watchers[i];\n return null;\n }\n\n function removeWatcher(w) {\n for (var i = 0; i < watchers.length; i++) if (watchers[i] === w) { watchers.splice(i, 1); return; }\n }\n\n function dropStaleWatchers(formEl, block) {\n for (var i = watchers.length - 1; i >= 0; i--) {\n var w = watchers[i];\n if (w.form === formEl) continue;\n if (!isConnected(w.form) || (block && w.block === block)) w.cleanup();\n }\n }\n\n function createWatcher(formEl, block) {\n var scope = (formEl.closest && formEl.closest('.form-wrapper')) || block;\n function markers() {\n var text = false;\n try { text = !!(scope && scope.querySelector('.form-submission-text')); } catch (e) {}\n return {\n submitted: hasToken(formEl, 'react-form-contents--submitted'),\n button: hasToken(submitButtonOf(formEl), 'success'),\n text: text\n };\n }\n var w = {\n form: formEl,\n block: block,\n identity: formIdentity(block),\n armed: false,\n submitAt: 0,\n answered: true,\n done: false,\n timer: null,\n observer: null,\n pagehideArmed: false,\n staleError: false,\n had: markers()\n };\n\n function redirectConfigured() {\n try { return !!(formEl.getAttribute && formEl.getAttribute('data-success-redirect')); } catch (e) { return false; }\n }\n\n function cleanup() {\n w.done = true;\n if (w.timer) { try { clearTimeout(w.timer); } catch (e) {} w.timer = null; }\n if (w.observer) { try { w.observer.disconnect(); } catch (e) {} w.observer = null; }\n if (w.pagehideArmed) {\n try { window.removeEventListener('pagehide', onPageHide, true); } catch (e) {}\n w.pagehideArmed = false;\n }\n removeWatcher(w);\n }\n\n function fire() {\n if (w.done) return;\n cleanup();\n firedForms.push(formEl);\n var payload = { event: EVENT_NAME, form_id: w.identity.formId };\n if (w.identity.formName) payload.form_name = w.identity.formName;\n window.dataLayer.push(payload);\n }\n\n function domConfirmsSuccess() {\n var m = markers();\n return (m.submitted && !w.had.submitted) || (m.button && !w.had.button) || (m.text && !w.had.text);\n }\n\n function check() {\n if (w.done || !w.armed) return;\n if (!isConnected(formEl)) { cleanup(); return; }\n if (domConfirmsSuccess()) { fire(); return; }\n if (w.answered) return;\n // A fresh error state on the button is Squarespace refusing this\n // attempt; one left over from an earlier attempt is not.\n var errorShowing = hasToken(submitButtonOf(formEl), 'error');\n if (!errorShowing) w.staleError = false;\n else if (!w.staleError) w.answered = true;\n }\n\n function onPageHide() {\n if (w.done || !w.armed) return;\n if (!isConnected(formEl)) { cleanup(); return; }\n if (domConfirmsSuccess()) { fire(); return; }\n if (saveOwnershipAmbiguous(formEl, w.submitAt, now())) { cleanup(); return; }\n var entries = saveEntriesSince(w.submitAt);\n var last = entries[entries.length - 1];\n var status = statusOf(last);\n if (status !== null && status >= 200 && status < 300) {\n claimed.push(last);\n fire();\n return;\n }\n cleanup();\n }\n\n w.refresh = function (submitAt) {\n // A new attempt replaces the old one once the old one was answered\n // (or its save has been seen); a double submit keeps the first.\n if (!w.armed || w.answered || saveEntriesSince(w.submitAt).length > 0) {\n w.submitAt = submitAt;\n w.answered = false;\n w.staleError = hasToken(submitButtonOf(formEl), 'error');\n }\n w.armed = true;\n if (w.timer) { try { clearTimeout(w.timer); } catch (e) {} }\n try { w.timer = setTimeout(cleanup, WATCH_MS); } catch (e) {}\n if (!w.pagehideArmed && redirectConfigured()) {\n try {\n window.addEventListener('pagehide', onPageHide, true);\n w.pagehideArmed = true;\n } catch (e) {}\n }\n };\n w.check = check;\n w.fire = fire;\n w.cleanup = cleanup;\n w.alive = function () { return isConnected(formEl); };\n w.markAnswered = function () { w.answered = true; };\n\n try {\n if (typeof MutationObserver !== 'undefined' && block) {\n w.observer = new MutationObserver(check);\n w.observer.observe(block, { childList: true, subtree: true, attributes: true, attributeFilter: ['class'] });\n }\n } catch (e) {}\n watchers.push(w);\n return w;\n }\n\n // ---- The save request's verdict, from resource timing ----\n\n function onResourceEntries(list) {\n var entries;\n try { entries = list.getEntries(); } catch (e) { return; }\n for (var i = 0; i < entries.length; i++) {\n var e = entries[i];\n if (!e || !isSaveEntry(e)) continue;\n if (seenSaves.indexOf(e) === -1) { seenSaves.push(e); prune(); }\n var status = statusOf(e);\n if (status === null || claimed.indexOf(e) !== -1) continue;\n var candidates = [];\n for (var j = 0; j < watchers.length; j++) {\n var w = watchers[j];\n if (!w.done && w.armed && !w.answered && w.alive() && e.startTime >= w.submitAt) candidates.push(w);\n }\n if (candidates.length !== 1) continue;\n var c = candidates[0];\n if (saveOwnershipAmbiguous(c.form, c.submitAt, e.startTime)) continue;\n if (status >= 200 && status < 300) {\n claimed.push(e);\n c.fire();\n } else {\n c.markAnswered();\n }\n }\n }\n\n // ---- Submits ----\n\n function handleSubmit(event) {\n try {\n var formEl = event.target;\n if (!formEl || (formEl.tagName || '').toLowerCase() !== 'form') return;\n submitLog.push({ form: formEl, at: now() });\n prune();\n if (!isSquarespaceForm(formEl)) return;\n var block = blockFor(formEl);\n dropStaleWatchers(formEl, block);\n // Squarespace allows one success per page view.\n if (firedForms.indexOf(formEl) !== -1) return;\n if (hasToken(formEl, 'react-form-contents--submitted')) return;\n if (honeypotFilled(formEl)) {\n var old = findWatcher(formEl);\n if (old) old.cleanup();\n return;\n }\n var w = findWatcher(formEl) || createWatcher(formEl, block);\n w.refresh(now());\n } catch (e) {\n // Never throw back into Squarespace's own form handling.\n }\n }\n\n document.addEventListener('submit', handleSubmit, true);\n try {\n if (typeof PerformanceObserver !== 'undefined') {\n new PerformanceObserver(onResourceEntries).observe({ type: 'resource' });\n }\n } catch (e) {}\n})();\n</script>"+ },+ {+ "type": "BOOLEAN",+ "key": "supportDocumentWrite",+ "value": "false"+ }+ ],+ "firingTriggerId": [+ "2147479553"+ ],+ "tagFiringOption": "ONCE_PER_EVENT",+ "monitoringMetadata": {+ "type": "MAP"+ },+ "consentSettings": {+ "consentStatus": "NOT_SET"+ }+ }+ ],+ "trigger": [+ {+ "accountId": "0",+ "containerId": "0",+ "triggerId": "2",+ "name": "CE - Squarespace Form Submitted",+ "type": "CUSTOM_EVENT",+ "customEventFilter": [+ {+ "type": "EQUALS",+ "parameter": [+ {+ "type": "TEMPLATE",+ "key": "arg0",+ "value": "{{_event}}"+ },+ {+ "type": "TEMPLATE",+ "key": "arg1",+ "value": "squarespace_form_submitted"+ }+ ]+ }+ ],+ "filter": []+ }+ ],+ "variable": [+ {+ "accountId": "0",+ "containerId": "0",+ "variableId": "1",+ "name": "DLV - Squarespace Form ID",+ "type": "v",+ "parameter": [+ {+ "type": "TEMPLATE",+ "key": "name",+ "value": "form_id"+ },+ {+ "type": "INTEGER",+ "key": "dataLayerVersion",+ "value": "2"+ }+ ]+ },+ {+ "accountId": "0",+ "containerId": "0",+ "variableId": "2",+ "name": "DLV - Squarespace Form Name",+ "type": "v",+ "parameter": [+ {+ "type": "TEMPLATE",+ "key": "name",+ "value": "form_name"+ },+ {+ "type": "INTEGER",+ "key": "dataLayerVersion",+ "value": "2"+ }+ ]+ }+ ],+ "fingerprint": "0",+ "tagManagerUrl": "https://tagmanager.google.com/#/container/accounts/0/containers/0/workspaces/0"+ }+}\ No newline at end of filediff --git a/skills/conversion-tracking/assets/gtm-recipes/event-map.json b/skills/conversion-tracking/assets/gtm-recipes/event-map.jsonindex a7c3c1a..78b1b04 100644--- a/skills/conversion-tracking/assets/gtm-recipes/event-map.json+++ b/skills/conversion-tracking/assets/gtm-recipes/event-map.json@@ -69,6 +69,11 @@"moment": "phone call intent","event": "phone_click"},+ "squarespace-forms": {+ "label": "Squarespace Forms",+ "moment": "form submission",+ "event": "squarespace_form_submitted"+ },"tally": {"label": "Tally","moment": "form submission",diff --git a/skills/conversion-tracking/assets/snippets/README.md b/skills/conversion-tracking/assets/snippets/README.mdindex 6393a34..8fbe598 100644--- a/skills/conversion-tracking/assets/snippets/README.md+++ b/skills/conversion-tracking/assets/snippets/README.md@@ -30,6 +30,7 @@ These names are load-bearing. The audit routes in SKILL.md check for exactly the| Gravity Forms | `gravity-forms.js` | Form submission | `gravity_form_submitted` || Jotform | `jotform.js` | Form submission | `jotform_form_submitted` || Ninja Forms | `ninja-forms.js` | Form submission | `ninja_forms_submitted` |+| Squarespace Forms | `squarespace-forms.js` | Form submission | `squarespace_form_submitted` || Tally | `tally.js` | Form submission | `tally_form_submitted` || Typeform | `typeform.js` | Form submission | `typeform_form_submitted` || Webflow Forms | `webflow-forms.js` | Form submission | `webflow_form_submitted` |@@ -70,6 +71,7 @@ Not every snippet fires on a confirmed success. Some tools expose no success sig| `gravity-forms.js` | Native success event; DOM-inferred after submit (builds without `gform.utils`) | `gform/ajax/post_ajax_submission` result with `success`, `is_valid`, `submission_type` `submit`, `is_spam` false and a positive `entry_id`, once per form and entry ID (the snippet switches non-AJAX and iframe submits to Gravity's AJAX); older builds: submit or `gform_submit_button_` click, then jQuery `gform_confirmation_loaded`, the AJAX iframe's postback or a visible `gform_confirmation_message_<id>`, or after a reload that form's confirmation within 60s with no validation errors; once per attempt || `jotform.js` | Native success event | `{action: 'submission-completed', formID}` postMessage from `https://form.jotform.com` or `https://submit.jotform.com`, accepted only from an iframe on the page whose `form.jotform.com/<id>` address matches the form ID; once per iframe until the page reloads. Covers the iframe and script embeds, not the full source-code embed || `ninja-forms.js` | Native success event | Radio `forms` channel `submit:response` with empty `errors`, no `halt`, a `form_id` matching the callback's and a saved entry ID (`actions.save.sub_id`, so the form needs its Record Submission action); once per entry ID, with no DOM fallback |+| `squarespace-forms.js` | DOM-inferred after submit | submit on a Squarespace 7.1 Form block (`form.react-form-contents`), then the first of a success marker that wasn't showing when the attempt began (`react-form-contents--submitted`, a `.form-submission-text` message or the button's `success` class), or a 2xx answer to Squarespace's own `/api/form/SaveFormSubmission` request, read from resource timing (Chromium and Firefox expose its status, Safari doesn't) and credited only when no other form was submitted around it, or either of those as a redirect form leaves the page; never on a 400 or 401, a filled anti-spam field, or a save it can't tie to one form; once per form per page view. Lightbox forms, 7.0 forms, and commerce and member forms are not covered || `tally.js` | Native success event | `Tally.FormSubmitted` postMessage from `https://tally.so`, accepted only from a loaded `tally.so/embed`, `/r` or `/popup` iframe for the same form ID, with a submission `id` and a `fields` array; once per form and submission ID || `typeform.js` | Native success event | `form-submit` postMessage from an https `typeform.com` origin carrying `formId` and `responseId`, accepted only from a Typeform iframe on the page whose `/to/<formId>` address matches; once per form and response ID || `webflow-forms.js` | DOM-inferred after submit | submit on a form in `.w-form`, then within 30s `.w-form-done` becomes visible, or Webflow's own form state shows a redirect with `success === true` (checked on jQuery `ajaxComplete`); a newly shown `.w-form-fail` or the timeout cancels, and a resubmit replaces the pending watch |diff --git a/skills/conversion-tracking/assets/snippets/squarespace-forms.js b/skills/conversion-tracking/assets/snippets/squarespace-forms.jsnew file mode 100644index 0000000..f66a132--- /dev/null+++ b/skills/conversion-tracking/assets/snippets/squarespace-forms.js@@ -0,0 +1,400 @@+/*! Squarespace Forms conversion detection (MIT)+ * Detects: form submission. Pushes dataLayer event: squarespace_form_submitted+ * From the conversion-tracking skill in Marketing Skills */+(function () {+ 'use strict';+ // Install once, even if GTM injects this tag more than once on the page.+ if (window.__ctDetectSquarespaceForms) return;+ window.__ctDetectSquarespaceForms = true;+ window.dataLayer = window.dataLayer || [];++ // Ported from a production module (cdn/v1/modules/+ // squarespace-forms.js, measured against a live Squarespace 7.1 site in+ // October 2026). Event only: it never reads what the visitor typed.+ //+ // What Squarespace does:+ // - The Form block renders a React form in the page (no iframe):+ // .sqs-block-form ... form.react-form-contents[novalidate]. It mounts+ // after DOMContentLoaded, so submits are caught on document.+ // - There is no check in the browser. Every submit posts+ // /api/form/FormSubmissionKey then /api/form/SaveFormSubmission, and the+ // server decides: 204 on success, 400 for a field error, 401 for a failed+ // reCAPTCHA. A submit is never a conversion on its own.+ // - On success it marks the form (react-form-contents--submitted), shows a+ // .form-submission-text message and gives the button the class+ // "success". A form set to redirect leaves for its page about 1.3+ // seconds after the 204, before that message renders in Chromium.+ // - The Newsletter block posts to the same SaveFormSubmission address, and+ // that request carries no form identity, so a save only counts for a+ // form that provably owns it.+ //+ // It fires once per form, on the first confirmed success for an attempt:+ // 1. a success marker that was not there when the attempt started, or+ // 2. the SaveFormSubmission request answering 2xx (read from the+ // browser's resource timing, where it exposes responseStatus), when+ // no other form was submitted around it, or+ // 3. as the page leaves (a redirect form), either of the above.+ // It never fires on a 400 or 401, on a filled anti-spam field, or when it+ // cannot tell which form a save belongs to.++ var EVENT_NAME = 'squarespace_form_submitted';+ var BLOCK_SELECTOR = '.sqs-block-form, [data-sqsp-block="form"], [data-definition-name="website.components.form"]';+ var SAVE_PATH = '/api/form/SaveFormSubmission';+ // Long enough for a visitor to solve a reCAPTCHA picture challenge.+ var WATCH_MS = 180000;+ // A submit this soon before an attempt, still unanswered, makes the next+ // save ambiguous.+ var LOOKBACK_MS = 5000;++ function now() {+ try {+ if (window.performance && typeof window.performance.now === 'function') return window.performance.now();+ } catch (e) {}+ return 0;+ }++ function hasToken(el, token) {+ if (!el || !el.getAttribute) return false;+ var cls = el.getAttribute('class') || '';+ return (' ' + cls + ' ').indexOf(' ' + token + ' ') !== -1;+ }++ function isConnected(el) {+ try {+ if (typeof el.isConnected === 'boolean') return el.isConnected;+ return !!(el.ownerDocument && el.ownerDocument.documentElement.contains(el));+ } catch (e) {+ return false;+ }+ }++ // ---- Which forms are Squarespace forms ----++ function blockFor(formEl) {+ try {+ return (formEl && formEl.closest) ? formEl.closest(BLOCK_SELECTOR) : null;+ } catch (e) {+ return null;+ }+ }++ function isSquarespaceForm(formEl) {+ if (!formEl || (formEl.tagName || '').toLowerCase() !== 'form') return false;+ return !!blockFor(formEl);+ }++ // The block's own form definition (the site owner's settings, not the+ // visitor's answers): { formId, formName, ... }.+ function formIdentity(block) {+ var id = { formId: '', formName: '' };+ try {+ var script = block && block.querySelector('script.sqs-form-block-context');+ if (!script) return id;+ var parsed = JSON.parse(script.textContent || '{}');+ if (parsed && typeof parsed.formId === 'string') id.formId = parsed.formId;+ if (parsed && typeof parsed.formName === 'string') id.formName = parsed.formName;+ } catch (e) {}+ return id;+ }++ // The honeypot is a text input visitors cannot see or reach (measured id+ // "message-field", inside an aria-hidden wrapper). Squarespace answers a+ // filled one with a 204 and its thank-you message, so a filled honeypot+ // means a bot. Only whether it is empty is checked.+ function honeypotFilled(formEl) {+ try {+ var hp = formEl.querySelector('#message-field');+ if (!hp) return false;+ var wrap = hp.closest && hp.closest('[aria-hidden="true"]');+ if (!wrap || !formEl.contains(wrap)) return false;+ return hp.value !== '';+ } catch (e) {+ return false;+ }+ }++ function submitButtonOf(formEl) {+ try { return formEl.querySelector('button[type="submit"]'); } catch (e) { return null; }+ }++ // ---- Which form a save request belongs to ----++ var seenSaves = []; // SaveFormSubmission resource entries seen so far+ var claimed = []; // entries already credited to a form+ var submitLog = []; // every form submit on the page, with its time++ function pageOrigin() {+ try {+ var l = window.location;+ return l.origin || (l.protocol + '//' + l.host);+ } catch (e) {+ return '';+ }+ }++ // The save request's address is checked for its origin and path only.+ function isSaveEntry(e) {+ var n = (e && e.name) || '';+ var origin = pageOrigin();+ if (!origin || n.indexOf(origin + '/') !== 0) return false;+ return n.slice(origin.length).split(/[?#]/)[0] === SAVE_PATH;+ }++ function prune() {+ var cutoff = now() - (WATCH_MS + LOOKBACK_MS);+ var i;+ for (i = submitLog.length - 1; i >= 0; i--) if (submitLog[i].at < cutoff) submitLog.splice(i, 1);+ for (i = seenSaves.length - 1; i >= 0; i--) if (seenSaves[i].startTime < cutoff) seenSaves.splice(i, 1);+ if (seenSaves.length > 100) seenSaves.splice(0, seenSaves.length - 100);+ if (claimed.length > 100) claimed.splice(0, claimed.length - 100);+ }++ function allSaveEntries() {+ var all = seenSaves.slice();+ try {+ if (window.performance && typeof window.performance.getEntriesByType === 'function') {+ var buffered = window.performance.getEntriesByType('resource');+ for (var b = 0; b < buffered.length; b++) if (all.indexOf(buffered[b]) === -1) all.push(buffered[b]);+ }+ } catch (err) {}+ var out = [];+ for (var i = 0; i < all.length; i++) if (isSaveEntry(all[i])) out.push(all[i]);+ return out;+ }++ function saveEntriesSince(since) {+ var all = allSaveEntries();+ var out = [];+ for (var i = 0; i < all.length; i++) {+ if (all[i].startTime >= since && claimed.indexOf(all[i]) === -1) out.push(all[i]);+ }+ out.sort(function (x, y) { return x.startTime - y.startTime; });+ return out;+ }++ // Another form (a Newsletter block included) submitted during this+ // attempt, or just before it without its own save yet, makes a save+ // ambiguous.+ function saveOwnershipAmbiguous(formEl, since, until) {+ var saves = null;+ for (var i = 0; i < submitLog.length; i++) {+ var s = submitLog[i];+ if (s.form === formEl || s.at > until) continue;+ if (s.at >= since) return true;+ if (s.at >= since - LOOKBACK_MS) {+ if (!saves) saves = allSaveEntries();+ var answered = false;+ for (var j = 0; j < saves.length; j++) {+ if (saves[j].startTime >= s.at && saves[j].startTime < since) { answered = true; break; }+ }+ if (!answered) return true;+ }+ }+ return false;+ }++ function statusOf(entry) {+ var s = entry && entry.responseStatus;+ return (typeof s === 'number' && s > 0) ? s : null;+ }++ // ---- One watcher per form ----++ var watchers = [];+ var firedForms = [];++ function findWatcher(formEl) {+ for (var i = 0; i < watchers.length; i++) if (watchers[i].form === formEl) return watchers[i];+ return null;+ }++ function removeWatcher(w) {+ for (var i = 0; i < watchers.length; i++) if (watchers[i] === w) { watchers.splice(i, 1); return; }+ }++ function dropStaleWatchers(formEl, block) {+ for (var i = watchers.length - 1; i >= 0; i--) {+ var w = watchers[i];+ if (w.form === formEl) continue;+ if (!isConnected(w.form) || (block && w.block === block)) w.cleanup();+ }+ }++ function createWatcher(formEl, block) {+ var scope = (formEl.closest && formEl.closest('.form-wrapper')) || block;+ function markers() {+ var text = false;+ try { text = !!(scope && scope.querySelector('.form-submission-text')); } catch (e) {}+ return {+ submitted: hasToken(formEl, 'react-form-contents--submitted'),+ button: hasToken(submitButtonOf(formEl), 'success'),+ text: text+ };+ }+ var w = {+ form: formEl,+ block: block,+ identity: formIdentity(block),+ armed: false,+ submitAt: 0,+ answered: true,+ done: false,+ timer: null,+ observer: null,+ pagehideArmed: false,+ staleError: false,+ had: markers()+ };++ function redirectConfigured() {+ try { return !!(formEl.getAttribute && formEl.getAttribute('data-success-redirect')); } catch (e) { return false; }+ }++ function cleanup() {+ w.done = true;+ if (w.timer) { try { clearTimeout(w.timer); } catch (e) {} w.timer = null; }+ if (w.observer) { try { w.observer.disconnect(); } catch (e) {} w.observer = null; }+ if (w.pagehideArmed) {+ try { window.removeEventListener('pagehide', onPageHide, true); } catch (e) {}+ w.pagehideArmed = false;+ }+ removeWatcher(w);+ }++ function fire() {+ if (w.done) return;+ cleanup();+ firedForms.push(formEl);+ var payload = { event: EVENT_NAME, form_id: w.identity.formId };+ if (w.identity.formName) payload.form_name = w.identity.formName;+ window.dataLayer.push(payload);+ }++ function domConfirmsSuccess() {+ var m = markers();+ return (m.submitted && !w.had.submitted) || (m.button && !w.had.button) || (m.text && !w.had.text);+ }++ function check() {+ if (w.done || !w.armed) return;+ if (!isConnected(formEl)) { cleanup(); return; }+ if (domConfirmsSuccess()) { fire(); return; }+ if (w.answered) return;+ // A fresh error state on the button is Squarespace refusing this+ // attempt; one left over from an earlier attempt is not.+ var errorShowing = hasToken(submitButtonOf(formEl), 'error');+ if (!errorShowing) w.staleError = false;+ else if (!w.staleError) w.answered = true;+ }++ function onPageHide() {+ if (w.done || !w.armed) return;+ if (!isConnected(formEl)) { cleanup(); return; }+ if (domConfirmsSuccess()) { fire(); return; }+ if (saveOwnershipAmbiguous(formEl, w.submitAt, now())) { cleanup(); return; }+ var entries = saveEntriesSince(w.submitAt);+ var last = entries[entries.length - 1];+ var status = statusOf(last);+ if (status !== null && status >= 200 && status < 300) {+ claimed.push(last);+ fire();+ return;+ }+ cleanup();+ }++ w.refresh = function (submitAt) {+ // A new attempt replaces the old one once the old one was answered+ // (or its save has been seen); a double submit keeps the first.+ if (!w.armed || w.answered || saveEntriesSince(w.submitAt).length > 0) {+ w.submitAt = submitAt;+ w.answered = false;+ w.staleError = hasToken(submitButtonOf(formEl), 'error');+ }+ w.armed = true;+ if (w.timer) { try { clearTimeout(w.timer); } catch (e) {} }+ try { w.timer = setTimeout(cleanup, WATCH_MS); } catch (e) {}+ if (!w.pagehideArmed && redirectConfigured()) {+ try {+ window.addEventListener('pagehide', onPageHide, true);+ w.pagehideArmed = true;+ } catch (e) {}+ }+ };+ w.check = check;+ w.fire = fire;+ w.cleanup = cleanup;+ w.alive = function () { return isConnected(formEl); };+ w.markAnswered = function () { w.answered = true; };++ try {+ if (typeof MutationObserver !== 'undefined' && block) {+ w.observer = new MutationObserver(check);+ w.observer.observe(block, { childList: true, subtree: true, attributes: true, attributeFilter: ['class'] });+ }+ } catch (e) {}+ watchers.push(w);+ return w;+ }++ // ---- The save request's verdict, from resource timing ----++ function onResourceEntries(list) {+ var entries;+ try { entries = list.getEntries(); } catch (e) { return; }+ for (var i = 0; i < entries.length; i++) {+ var e = entries[i];+ if (!e || !isSaveEntry(e)) continue;+ if (seenSaves.indexOf(e) === -1) { seenSaves.push(e); prune(); }+ var status = statusOf(e);+ if (status === null || claimed.indexOf(e) !== -1) continue;+ var candidates = [];+ for (var j = 0; j < watchers.length; j++) {+ var w = watchers[j];+ if (!w.done && w.armed && !w.answered && w.alive() && e.startTime >= w.submitAt) candidates.push(w);+ }+ if (candidates.length !== 1) continue;+ var c = candidates[0];+ if (saveOwnershipAmbiguous(c.form, c.submitAt, e.startTime)) continue;+ if (status >= 200 && status < 300) {+ claimed.push(e);+ c.fire();+ } else {+ c.markAnswered();+ }+ }+ }++ // ---- Submits ----++ function handleSubmit(event) {+ try {+ var formEl = event.target;+ if (!formEl || (formEl.tagName || '').toLowerCase() !== 'form') return;+ submitLog.push({ form: formEl, at: now() });+ prune();+ if (!isSquarespaceForm(formEl)) return;+ var block = blockFor(formEl);+ dropStaleWatchers(formEl, block);+ // Squarespace allows one success per page view.+ if (firedForms.indexOf(formEl) !== -1) return;+ if (hasToken(formEl, 'react-form-contents--submitted')) return;+ if (honeypotFilled(formEl)) {+ var old = findWatcher(formEl);+ if (old) old.cleanup();+ return;+ }+ var w = findWatcher(formEl) || createWatcher(formEl, block);+ w.refresh(now());+ } catch (e) {+ // Never throw back into Squarespace's own form handling.+ }+ }++ document.addEventListener('submit', handleSubmit, true);+ try {+ if (typeof PerformanceObserver !== 'undefined') {+ new PerformanceObserver(onResourceEntries).observe({ type: 'resource' });+ }+ } catch (e) {}+})();diff --git a/skills/conversion-tracking/evals/evals.json b/skills/conversion-tracking/evals/evals.jsonindex e0af31b..7a4ea4d 100644--- a/skills/conversion-tracking/evals/evals.json+++ b/skills/conversion-tracking/evals/evals.json@@ -142,10 +142,10 @@{"id": 12,"prompt": "I'm on Squarespace using their built-in contact form. Want leads in Google Ads. Is that even possible?",- "expected_output": "Should say yes and never call the tool unsupported. Squarespace forms submit via AJAX with an inline success message; the free paths are the post-submit HTML field (Squarespace's form guide lists no plan gate for it, though code blocks and code injection need a Core plan or above), a redirect to a thank-you page, or the generic AJAX success pattern. Should note Squarespace has no native server-side integration (browser pixel only), so the structural losses apply and the server-side options exist if those matter. Should deliver a complete working free path.",+ "expected_output": "Should say yes and never call the tool unsupported. Squarespace forms submit via AJAX with an inline success message; the free paths are the Squarespace Forms snippet or its GTM recipe (squarespace-forms, for 7.1 Form blocks), the post-submit HTML field (Squarespace's form guide lists no plan gate for it, though code blocks and code injection need a Core plan or above), a redirect to a thank-you page, or the generic AJAX success pattern. Should note Squarespace has no native server-side integration (browser pixel only), so the structural losses apply and the server-side options exist if those matter. Should deliver a complete working free path.","assertions": ["Never says the tool is unsupported",- "Identifies the AJAX inline-success pattern and its hooks",+ "Offers the Squarespace Forms snippet or another working success hook","Delivers a complete free path","Correctly states Squarespace has no native server-side integration"],diff --git a/skills/conversion-tracking/references/browser-side.md b/skills/conversion-tracking/references/browser-side.mdindex 63a1b75..14b0eff 100644--- a/skills/conversion-tracking/references/browser-side.md+++ b/skills/conversion-tracking/references/browser-side.md@@ -79,7 +79,7 @@ gtag('set', 'user_data', {### The GTM route and the recipe system-With GTM installed, prefer importing a prebuilt container over hand-building tags. This skill ships importable recipes for 18 form and booking tools, 4 universal patterns, and 6 destinations:+With GTM installed, prefer importing a prebuilt container over hand-building tags. This skill ships importable recipes for 19 form and booking tools, 4 universal patterns, and 6 destinations:```python3 ../scripts/build_recipe.py --tool gravity-forms --send google-ads \diff --git a/skills/conversion-tracking/references/conversion-moments.md b/skills/conversion-tracking/references/conversion-moments.mdindex b4ae460..0d034af 100644--- a/skills/conversion-tracking/references/conversion-moments.md+++ b/skills/conversion-tracking/references/conversion-moments.md@@ -2,7 +2,7 @@Load this to establish or diagnose the conversion moment. Section 1 is the lead-gen problem (success must be inferred from a browser signal, and every tool signals differently); it carries literal, grep-able strings for working from (A) form mechanics, (B) static page source, (C) a headless browser, and (D) a codebase. Section 2 covers the moments this repo ships tested detectors for. Section 3 is the long tail. Section 4 is ecommerce, where the problem mostly does not exist.-**Fix assets.** When a finding here names a missing or wrong detection hook, the fix usually already exists in this skill. Tested listeners for 18 tools live in `../assets/snippets/` (paste-in JS) and `../assets/gtm-recipes/detect/` (importable GTM containers), both pushing the canonical dataLayer event names listed in `../assets/gtm-recipes/event-map.json` (for example `gravity_form_submitted`, `typeform_form_submitted`, `calendly_event_scheduled`). Diagnose against those exact names, fix by installing those exact assets.+**Fix assets.** When a finding here names a missing or wrong detection hook, the fix usually already exists in this skill. Tested listeners for 19 tools live in `../assets/snippets/` (paste-in JS) and `../assets/gtm-recipes/detect/` (importable GTM containers), both pushing the canonical dataLayer event names listed in `../assets/gtm-recipes/event-map.json` (for example `gravity_form_submitted`, `typeform_form_submitted`, `calendly_event_scheduled`). Diagnose against those exact names, fix by installing those exact assets.## 1. Lead gen@@ -44,7 +44,7 @@ Stacking complications: multi-step forms (only final step converts; step events**Framer** - React forms, inline success swap, no navigation, no built-in GTM event. Track via custom listener/element observation or redirect. Framer can auto-capture UTM/GCLID into form fields (built-in feature).-**Squarespace** - AJAX + inline message default; options: redirect URL, or "Post-Submit HTML" field that injects and executes code only after successful submit (a de facto conversion hook; Squarespace gates JavaScript and code injection to Core plans and above, and its form docs state no separate gate for this field).+**Squarespace** - AJAX + inline message default. A 7.1 Form block renders in the page (no iframe) and saves through `/api/form/SaveFormSubmission`, and Squarespace's server decides (204 saved, 400 field error, 401 failed reCAPTCHA), so a submit alone is never a conversion. `squarespace-forms.js` fires only once Squarespace confirms the entry was saved, once per form per page view, and also works for forms set to redirect. It doesn't cover lightbox forms, 7.0 forms, or commerce or member forms. It was live-checked 15 Oct 2026 on inline, redirect and shared-page forms in Chromium, WebKit and Firefox. The other options are a redirect URL, or the "Post-Submit HTML" field that injects and executes code only after successful submit (a de facto conversion hook; Squarespace gates JavaScript and code injection to Core plans and above, and its form docs state no separate gate for this field).**Wix** - AJAX + inline success; tracking via Wix's own dashboard integrations (auto-fires form-submit conversion) or Velo `wixWindow.trackEvent`; raw GTM DOM listeners unreliable in Wix's framework. "Wix + manually pasted pixel" = high risk of no submit event.@@ -184,6 +184,7 @@ python3 ../scripts/build_recipe.py --tool <slug> --send <google-ads|ga4|meta|lin| `gravity-forms` | Gravity Forms | form submission | `gravity_form_submitted` || `jotform` | Jotform | form submission | `jotform_form_submitted` || `ninja-forms` | Ninja Forms | form submission | `ninja_forms_submitted` |+| `squarespace-forms` | Squarespace Forms | form submission | `squarespace_form_submitted` || `tally` | Tally | form submission | `tally_form_submitted` || `typeform` | Typeform | form submission | `typeform_form_submitted` || `webflow-forms` | Webflow Forms | form submission | `webflow_form_submitted` |@@ -194,7 +195,9 @@ python3 ../scripts/build_recipe.py --tool <slug> --send <google-ads|ga4|meta|lin**Detection confidence.** Most of these fire on the tool's own success event or on aconfirmed success state, which is exact. `framer-forms` fires when Framer's own form-endpoint answers its request with success. `wix-forms` fires when Wix's own thank-you+endpoint answers its request with success. `squarespace-forms` fires only once Squarespace+confirms the save, through its own success markers or its save request, never on the+submit alone. `wix-forms` fires when Wix's own thank-youmessage appears inside the form, which Wix shows only after the entry is saved. It coversWix's current forms with an inline thank-you message, not older Wix contact forms or formsset to go to another page after submitting.@@ -219,8 +222,8 @@ Some of these tools also have native server-side integrations from their own plamanaged tools listed there may cover them as built-in triggers; both live in `server-side.md`. What"no snippet" means is only that this skill's free browser-side detector does not exist yet.-**Shape 1, page listener** (32): ActiveCampaign, Kit, AWeber, Mailchimp, Klaviyo, HubSpot-Forms, Marketo, Pipedrive, Squarespace, Duda, Avada, Beaver Builder, GoHighLevel, Unbounce,+**Shape 1, page listener** (31): ActiveCampaign, Kit, AWeber, Mailchimp, Klaviyo, HubSpot+Forms, Marketo, Pipedrive, Duda, Avada, Beaver Builder, GoHighLevel, Unbounce,Instapage, Leadpages, Paperform, Fillout, Formstack, Zoho Forms, HelloBar, OptinMonster,ConvertBox, Thrive Leads, Cal.com, Acuity, HubSpot Meetings, Chili Piper, Intercom, Crisp,Tawk.to, Drift.diff --git a/skills/conversion-tracking/references/google-ads.md b/skills/conversion-tracking/references/google-ads.mdindex 33b7ac0..11efdef 100644--- a/skills/conversion-tracking/references/google-ads.md+++ b/skills/conversion-tracking/references/google-ads.md@@ -16,7 +16,7 @@ Guided setup for wiring a form or booking tool to Google Ads. The agent usuallyYou need three things:- Access to the Google Ads account (the user has this, you guide them).-- The form or booking tool in play. This skill has detection recipes for 18 form and booking tools, plus 4 universal patterns (phone clicks, file downloads, thank-you pages, and generic AJAX forms). The full list with canonical dataLayer event names lives in `../assets/gtm-recipes/event-map.json` and `../assets/snippets/README.md`. Example, Gravity Forms pushes `gravity_form_submitted`. Supported tools are Calendly, Contact Form 7, Divi Forms, Elementor Forms, Fluent Forms, Formidable Forms, Forminator, Framer Forms, Gravity Forms, Jotform, Ninja Forms, Tally, Typeform, Webflow Forms, Wix Forms, Wix Bookings, WPForms, and WS Form.+- The form or booking tool in play. This skill has detection recipes for 19 form and booking tools, plus 4 universal patterns (phone clicks, file downloads, thank-you pages, and generic AJAX forms). The full list with canonical dataLayer event names lives in `../assets/gtm-recipes/event-map.json` and `../assets/snippets/README.md`. Example, Gravity Forms pushes `gravity_form_submitted`. Supported tools are Calendly, Contact Form 7, Divi Forms, Elementor Forms, Fluent Forms, Formidable Forms, Forminator, Framer Forms, Gravity Forms, Jotform, Ninja Forms, Squarespace Forms, Tally, Typeform, Webflow Forms, Wix Forms, Wix Bookings, WPForms, and WS Form.- A decision on the install path. Check the site's page source for a `GTM-` container snippet, or ask the user. If GTM is installed, use Path A. If not, use Path B. Never do both, that double counts.Also do a quick duplicate pre-check before installing anything. Fetch the page source and look for an existing `AW-` ID, a `gtag('event', 'conversion'` call, or an existing Google Ads conversion tag inside the GTM container. If the same real-world action is already being tracked, fix or replace that setup rather than adding a second one on top. Two tags for one form is the classic overcounting setup.@@ -54,7 +54,7 @@ End state, GTM does all the listening and firing, and nothing gets pasted into t- **Goal.** Produce 1 GTM container file that bundles the tool's detection tag, the Google Ads conversion tag, and a Conversion Linker tag.- **Do this.** Run this, substituting the tool key from `../assets/gtm-recipes/event-map.json` and the 2 values from Step 2. `python3 ../scripts/build_recipe.py --tool {tool} --send google-ads --conversion-id {id} --conversion-label {label} -o import-me.json` The script uses only the Python standard library and can run from any folder, paths resolve relative to the script file.- **Expect to see.** The script prints "wrote import-me.json" plus which dataLayer event it detects and where it sends.-- **On error.** "invalid choice" on --tool means the tool key is misspelled or unsupported, check the 22 keys in `../assets/gtm-recipes/event-map.json`. A complaint about missing --conversion-id or --conversion-label means Step 2 values were not passed.+- **On error.** "invalid choice" on --tool means the tool key is misspelled or unsupported, check the 23 keys in `../assets/gtm-recipes/event-map.json`. A complaint about missing --conversion-id or --conversion-label means Step 2 values were not passed.**Step 4 - Import the file into GTM**- **Goal.** Load the 3 tags and their trigger into the site's existing GTM container without touching anything already there.