Skip to content

Marketing skills for Claude Code and AI agents. CRO, copywriting, SEO, analytics, and growth engineering.

fix(conversion-tracking): make every GTM recipe importable

Aaron Beashel440c546e987d
diff --git a/skills/conversion-tracking/assets/gtm-recipes/README.md b/skills/conversion-tracking/assets/gtm-recipes/README.md
index accadc9..78393e8 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/README.md
+++ b/skills/conversion-tracking/assets/gtm-recipes/README.md
@@ -8,7 +8,7 @@ Importable Google Tag Manager containers that produce one import-ready file per
**`send/` (6 templates, need values filled in before import).** Each contains the tag that actually records the conversion, wired to a placeholder trigger:
-- `send/google-ads.json` - a Google Ads conversion tag plus a Conversion Linker tag. Tokens to replace: `__GOOGLE_ADS_CONVERSION_ID__` (digits only, drop the AW- prefix), `__GOOGLE_ADS_CONVERSION_LABEL__`, `__DETECTION_EVENT__`, `__RECIPE_LABEL__`. It sends no conversion value or currency, so Google Ads falls back to the conversion action's default value. For value-based bidding (Maximize conversion value, tROAS), open the tag after import and fill **Conversion Value** and **Currency Code** (a fixed value like `150` and `USD`, or a dataLayer variable), or add `{ "type": "template", "key": "conversionValue", "value": "150" }` and `{ "type": "template", "key": "currencyCode", "value": "USD" }` to the tag's `parameter` list before import.
+- `send/google-ads.json` - a Google Ads conversion tag plus a Conversion Linker tag. Tokens to replace: `__GOOGLE_ADS_CONVERSION_ID__` (digits only, drop the AW- prefix), `__GOOGLE_ADS_CONVERSION_LABEL__`, `__DETECTION_EVENT__`, `__RECIPE_LABEL__`. It sends no conversion value or currency, so Google Ads falls back to the conversion action's default value. For value-based bidding (Maximize conversion value, tROAS), open the tag after import and fill **Conversion Value** and **Currency Code** (a fixed value like `150` and `USD`, or a dataLayer variable), or add `{ "type": "TEMPLATE", "key": "conversionValue", "value": "150" }` and `{ "type": "TEMPLATE", "key": "currencyCode", "value": "USD" }` to the tag's `parameter` list before import.
- `send/ga4.json` - a GA4 event tag. Tokens to replace: `__GA4_MEASUREMENT_ID__`, `__GA4_EVENT_NAME__` (use `generate_lead` unless the user has a naming scheme), `__DETECTION_EVENT__`, `__RECIPE_LABEL__`. It assumes a GA4 tag already runs on the site. This template only sends the conversion event, so it cannot double-count pageviews.
## Building a combined recipe (preferred path)
diff --git a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-calendly.json b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-calendly.json
index e099fd4..d5ff1da 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-calendly.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-calendly.json
@@ -55,18 +55,18 @@
"containerId": "0",
"triggerId": "2",
"name": "CE - Calendly Event Scheduled",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg0",
"value": "{{_event}}"
},
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg1",
"value": "calendly_event_scheduled"
}
@@ -85,12 +85,12 @@
"type": "v",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "name",
"value": "event_uri"
},
{
- "type": "integer",
+ "type": "INTEGER",
"key": "dataLayerVersion",
"value": "2"
}
@@ -104,12 +104,12 @@
"type": "v",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "name",
"value": "invitee_uri"
},
{
- "type": "integer",
+ "type": "INTEGER",
"key": "dataLayerVersion",
"value": "2"
}
diff --git a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-contact-form-7.json b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-contact-form-7.json
index 6c208e2..1905480 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-contact-form-7.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-contact-form-7.json
@@ -55,18 +55,18 @@
"containerId": "0",
"triggerId": "2",
"name": "CE - Contact Form 7 Submitted",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg0",
"value": "{{_event}}"
},
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg1",
"value": "contact_form_7_submitted"
}
@@ -85,12 +85,12 @@
"type": "v",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "name",
"value": "form_id"
},
{
- "type": "integer",
+ "type": "INTEGER",
"key": "dataLayerVersion",
"value": "2"
}
diff --git a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-divi-forms.json b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-divi-forms.json
index a480199..1eba3f2 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-divi-forms.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-divi-forms.json
@@ -55,18 +55,18 @@
"containerId": "0",
"triggerId": "2",
"name": "CE - Divi Forms Submitted",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg0",
"value": "{{_event}}"
},
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg1",
"value": "divi_form_submitted"
}
@@ -85,12 +85,12 @@
"type": "v",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "name",
"value": "form_id"
},
{
- "type": "integer",
+ "type": "INTEGER",
"key": "dataLayerVersion",
"value": "2"
}
diff --git a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-elementor-forms.json b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-elementor-forms.json
index df9cd6f..a2b296c 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-elementor-forms.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-elementor-forms.json
@@ -55,18 +55,18 @@
"containerId": "0",
"triggerId": "2",
"name": "CE - Elementor Forms Submitted",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg0",
"value": "{{_event}}"
},
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg1",
"value": "elementor_form_submitted"
}
@@ -85,12 +85,12 @@
"type": "v",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "name",
"value": "form_id"
},
{
- "type": "integer",
+ "type": "INTEGER",
"key": "dataLayerVersion",
"value": "2"
}
diff --git a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-file-download.json b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-file-download.json
index 6752484..245be1d 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-file-download.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-file-download.json
@@ -26,12 +26,12 @@
"type": "html",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "html",
"value": "<script>\n(function () {\n if (window.__ctDetectFileDownload) return;\n window.__ctDetectFileDownload = true;\n window.dataLayer = window.dataLayer || [];\n\n /* For gated content that is NOT gated: price lists, brochures, spec\n sheets, lead magnets served as a direct link. If the download sits\n behind a form, track the form instead — that is where the lead is.\n\n GA4 already collects file_download as an enhanced measurement event.\n Use this when you need the same signal in Google Ads or Meta, which\n do not. */\n\n // EDIT if you serve other formats.\n var EXTENSIONS = [\n 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx',\n 'csv', 'zip', 'rar', '7z', 'dmg', 'exe', 'pkg',\n 'mp3', 'mp4', 'mov', 'wav', 'txt', 'rtf'\n ];\n\n var DEDUPE_MS = 2000;\n var lastUrl = null;\n var lastAt = 0;\n\n function extensionOf(url) {\n try {\n // Strip query and hash before reading the extension, so\n // /brochure.pdf?utm_source=x still resolves to \"pdf\".\n var path = String(url || '').split('#')[0].split('?')[0];\n var name = path.substring(path.lastIndexOf('/') + 1);\n var dot = name.lastIndexOf('.');\n if (dot < 0) return null;\n var ext = name.substring(dot + 1).toLowerCase();\n for (var i = 0; i < EXTENSIONS.length; i++) {\n if (EXTENSIONS[i] === ext) return ext;\n }\n } catch (e) { /* fall through */ }\n return null;\n }\n\n function fileNameOf(url) {\n try {\n var path = String(url || '').split('#')[0].split('?')[0];\n return decodeURIComponent(path.substring(path.lastIndexOf('/') + 1));\n } catch (e) {\n return '';\n }\n }\n\n function handleClick(event) {\n try {\n if (event.button !== undefined && event.button !== 0) return;\n if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;\n\n var target = event.target;\n if (!target || !target.closest) return;\n\n var link = target.closest('a[href]');\n if (!link) return;\n\n // Resolve relative hrefs against the current page. .href does this for\n // us where available; getAttribute would leave \"/files/x.pdf\" relative.\n var url = link.href || link.getAttribute('href');\n if (!url) return;\n\n // An anchor carrying the download attribute is a download regardless\n // of extension, so honour that too.\n var ext = extensionOf(url);\n var forced = link.hasAttribute && link.hasAttribute('download');\n if (!ext && !forced) return;\n\n var now = new Date().getTime();\n if (url === lastUrl && (now - lastAt) < DEDUPE_MS) return;\n lastUrl = url;\n lastAt = now;\n\n window.dataLayer.push({\n event: 'file_download',\n file_name: fileNameOf(url),\n file_extension: ext || '',\n file_url: url,\n link_text: (link.textContent || '').trim().slice(0, 100),\n page_path: window.location.pathname\n });\n } catch (e) {\n // Never throw back into the page's own click handling.\n }\n }\n\n document.addEventListener('click', handleClick, false);\n})();\n</script>"
},
{
- "type": "boolean",
+ "type": "BOOLEAN",
"key": "supportDocumentWrite",
"value": "false"
}
@@ -54,18 +54,18 @@
"containerId": "0",
"triggerId": "2",
"name": "CE - File download",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg0",
"value": "{{_event}}"
},
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg1",
"value": "file_download"
}
diff --git a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-fluent-forms.json b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-fluent-forms.json
index 80389d7..9653143 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-fluent-forms.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-fluent-forms.json
@@ -55,18 +55,18 @@
"containerId": "0",
"triggerId": "2",
"name": "CE - Fluent Forms Submitted",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg0",
"value": "{{_event}}"
},
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg1",
"value": "fluent_forms_submitted"
}
@@ -85,12 +85,12 @@
"type": "v",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "name",
"value": "form_id"
},
{
- "type": "integer",
+ "type": "INTEGER",
"key": "dataLayerVersion",
"value": "2"
}
diff --git a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-formidable-forms.json b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-formidable-forms.json
index 81dd5d7..ef8e53e 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-formidable-forms.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-formidable-forms.json
@@ -55,18 +55,18 @@
"containerId": "0",
"triggerId": "2",
"name": "CE - Formidable Forms Submitted",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg0",
"value": "{{_event}}"
},
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg1",
"value": "formidable_forms_submitted"
}
@@ -85,12 +85,12 @@
"type": "v",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "name",
"value": "form_id"
},
{
- "type": "integer",
+ "type": "INTEGER",
"key": "dataLayerVersion",
"value": "2"
}
diff --git a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-forminator.json b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-forminator.json
index 8f78709..c1e8437 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-forminator.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-forminator.json
@@ -55,18 +55,18 @@
"containerId": "0",
"triggerId": "2",
"name": "CE - Forminator Submitted",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg0",
"value": "{{_event}}"
},
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg1",
"value": "forminator_form_submitted"
}
@@ -85,12 +85,12 @@
"type": "v",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "name",
"value": "form_id"
},
{
- "type": "integer",
+ "type": "INTEGER",
"key": "dataLayerVersion",
"value": "2"
}
diff --git a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-framer-forms.json b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-framer-forms.json
index 4114573..6f83636 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-framer-forms.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-framer-forms.json
@@ -55,18 +55,18 @@
"containerId": "0",
"triggerId": "2",
"name": "CE - Framer Form Submitted",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg0",
"value": "{{_event}}"
},
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg1",
"value": "framer_form_submitted"
}
@@ -85,12 +85,12 @@
"type": "v",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "name",
"value": "form_name"
},
{
- "type": "integer",
+ "type": "INTEGER",
"key": "dataLayerVersion",
"value": "2"
}
diff --git a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-generic-ajax-form.json b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-generic-ajax-form.json
index 2457464..a51bdf5 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-generic-ajax-form.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-generic-ajax-form.json
@@ -26,12 +26,12 @@
"type": "html",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "html",
"value": "<script>\n(function () {\n if (window.__ctDetectGenericAjaxForm) return;\n window.__ctDetectGenericAjaxForm = true;\n window.dataLayer = window.dataLayer || [];\n\n /* Last-resort fallback for form tools this repo has no specific snippet\n for. It infers success from the page changing after a submit, which is\n weaker than a tool's own success event. Always prefer a named snippet\n from snippets/ when one exists for the tool.\n\n The design deliberately refuses to fire on submit alone. A submit is an\n attempt; only a success signal appearing afterwards, with no visible\n validation error, is treated as a conversion. */\n\n var SUCCESS_WINDOW_MS = 7000; // how long to wait for a success signal\n var watchers = [];\n\n function fire(formEl) {\n window.dataLayer.push({\n event: 'form_submitted',\n form_id: (formEl && formEl.id) || '',\n form_name: (formEl && formEl.getAttribute && formEl.getAttribute('name')) || '',\n page_path: window.location.pathname,\n detection: 'generic-ajax'\n });\n }\n\n function isHidden(el) {\n try {\n if (el.hidden) return true;\n if (el.getAttribute && el.getAttribute('aria-hidden') === 'true') return true;\n var view = el.ownerDocument && el.ownerDocument.defaultView;\n if (view && view.getComputedStyle) {\n var cs = view.getComputedStyle(el);\n if (cs && (cs.display === 'none' || cs.visibility === 'hidden')) return true;\n }\n } catch (e) { /* fall through */ }\n return false;\n }\n\n // A visible validation error means the submit was rejected. This is the\n // guard that stops a failed submission being counted.\n function hasVisibleError(root) {\n try {\n var nodes = root.querySelectorAll(\n '[aria-invalid=\"true\"], .error, .is-invalid, [class*=\"error\"], [role=\"alert\"]'\n );\n for (var i = 0; i < nodes.length; i++) {\n if (isHidden(nodes[i])) continue;\n if (nodes[i].getAttribute &&\n nodes[i].getAttribute('aria-invalid') === 'true') return true;\n if ((nodes[i].textContent || '').trim()) return true;\n }\n } catch (e) { /* fall through */ }\n return false;\n }\n\n function looksLikeSuccess(node) {\n if (!node || node.nodeType !== 1) return false;\n try {\n var cls = (typeof node.className === 'string' ? node.className : '') || '';\n var hook = (node.getAttribute && node.getAttribute('data-hook')) || '';\n if (/error|invalid/i.test(cls + ' ' + hook)) return false;\n\n // Structural marker the tool itself stamped. Strongest signal here.\n if (/success|confirmation|thank/i.test(cls + ' ' + hook)) return true;\n\n var text = (node.textContent || '').trim();\n if (!text || text.length > 300) return false;\n if (/error|required|invalid|try again|please enter|please fill/i.test(text)) return false;\n // Still in flight, not done.\n if (/^(submitting|sending|loading|processing|please wait|one moment)\\b/i.test(text)) return false;\n return /thank you|thanks|success|received|we'?ll be in touch|message sent|submitted/i.test(text);\n } catch (e) {\n return false;\n }\n }\n\n function watch(formEl) {\n for (var i = 0; i < watchers.length; i++) {\n if (watchers[i].form === formEl) return; // already watching this form\n }\n\n var entry = { form: formEl };\n watchers.push(entry);\n\n var done = false;\n var observer = null;\n var timer = null;\n\n function stop() {\n done = true;\n if (observer) { try { observer.disconnect(); } catch (e) {} }\n if (timer) { clearTimeout(timer); }\n for (var j = 0; j < watchers.length; j++) {\n if (watchers[j] === entry) { watchers.splice(j, 1); break; }\n }\n }\n\n function evaluate(nodes) {\n if (done) return;\n // A visible error anywhere in the form means rejection. Give up.\n if (hasVisibleError(formEl)) { stop(); return; }\n for (var k = 0; k < nodes.length; k++) {\n if (looksLikeSuccess(nodes[k])) {\n fire(formEl);\n stop();\n return;\n }\n }\n }\n\n try {\n observer = new MutationObserver(function (mutations) {\n var added = [];\n for (var a = 0; a < mutations.length; a++) {\n var m = mutations[a];\n for (var b = 0; b < m.addedNodes.length; b++) added.push(m.addedNodes[b]);\n if (m.type === 'attributes' && m.target) added.push(m.target);\n }\n if (added.length) evaluate(added);\n });\n // Watch the form's container, so a success panel that REPLACES the form\n // is still seen. Falls back to the form itself.\n var scope = formEl.parentNode || formEl;\n observer.observe(scope, {\n childList: true, subtree: true,\n attributes: true, attributeFilter: ['class', 'style', 'hidden', 'aria-hidden']\n });\n } catch (e) {\n stop();\n return;\n }\n\n timer = setTimeout(stop, SUCCESS_WINDOW_MS);\n }\n\n function handleSubmit(event) {\n try {\n var formEl = event.target;\n if (!formEl || (formEl.tagName || '').toLowerCase() !== 'form') return;\n\n // Another handler already cancelled this submission.\n if (event.defaultPrevented) return;\n\n // Constraint validation gate: an invalid form cannot have submitted.\n try {\n if (typeof formEl.checkValidity === 'function' &&\n formEl.checkValidity() === false) return;\n } catch (e) { /* validation unavailable — fall through */ }\n\n watch(formEl);\n } catch (e) {\n // Never throw back into the page's own form handling.\n }\n }\n\n // Bubble phase so the tool's own handlers run first.\n document.addEventListener('submit', handleSubmit, false);\n})();\n</script>"
},
{
- "type": "boolean",
+ "type": "BOOLEAN",
"key": "supportDocumentWrite",
"value": "false"
}
@@ -54,18 +54,18 @@
"containerId": "0",
"triggerId": "2",
"name": "CE - Generic AJAX form",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg0",
"value": "{{_event}}"
},
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg1",
"value": "form_submitted"
}
diff --git a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-gravity-forms.json b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-gravity-forms.json
index acde0c7..c2ee45c 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-gravity-forms.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-gravity-forms.json
@@ -55,18 +55,18 @@
"containerId": "0",
"triggerId": "2",
"name": "CE - Gravity Forms Submitted",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg0",
"value": "{{_event}}"
},
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg1",
"value": "gravity_form_submitted"
}
@@ -85,12 +85,12 @@
"type": "v",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "name",
"value": "form_id"
},
{
- "type": "integer",
+ "type": "INTEGER",
"key": "dataLayerVersion",
"value": "2"
}
diff --git a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-jotform.json b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-jotform.json
index 1f3238c..aa2d277 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-jotform.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-jotform.json
@@ -55,18 +55,18 @@
"containerId": "0",
"triggerId": "2",
"name": "CE - Jotform Submitted",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg0",
"value": "{{_event}}"
},
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg1",
"value": "jotform_form_submitted"
}
@@ -85,12 +85,12 @@
"type": "v",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "name",
"value": "form_id"
},
{
- "type": "integer",
+ "type": "INTEGER",
"key": "dataLayerVersion",
"value": "2"
}
diff --git a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-ninja-forms.json b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-ninja-forms.json
index ca98806..24ef894 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-ninja-forms.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-ninja-forms.json
@@ -55,18 +55,18 @@
"containerId": "0",
"triggerId": "2",
"name": "CE - Ninja Forms Submitted",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg0",
"value": "{{_event}}"
},
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg1",
"value": "ninja_forms_submitted"
}
@@ -85,12 +85,12 @@
"type": "v",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "name",
"value": "form_id"
},
{
- "type": "integer",
+ "type": "INTEGER",
"key": "dataLayerVersion",
"value": "2"
}
diff --git a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-phone-click.json b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-phone-click.json
index b7b42a4..1816824 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-phone-click.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-phone-click.json
@@ -26,12 +26,12 @@
"type": "html",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "html",
"value": "<script>\n(function () {\n if (window.__ctDetectPhoneClick) return;\n window.__ctDetectPhoneClick = true;\n window.dataLayer = window.dataLayer || [];\n\n // A click is a call INTENT, not a completed call. On desktop especially,\n // many tel: clicks never become a conversation. Count it as a lead signal,\n // and prefer a call tracking number if you need answered-call accuracy.\n\n // Ignore a repeat click on the same number inside this window. Impatient\n // double-taps on mobile are common and would otherwise double count.\n var DEDUPE_MS = 2000;\n var lastNumber = null;\n var lastAt = 0;\n\n function normalise(href) {\n // tel:+61 (2) 1234-5678 -> +61212345678 . Keeps a leading +, drops the\n // punctuation humans put in phone numbers so dedupe compares like for like.\n var raw = String(href || '').replace(/^tel:/i, '');\n try { raw = decodeURIComponent(raw); } catch (e) { /* leave as-is */ }\n var plus = raw.trim().charAt(0) === '+' ? '+' : '';\n return plus + raw.replace(/[^0-9]/g, '');\n }\n\n function handleClick(event) {\n try {\n // Left click only, and not a modified click that opens elsewhere.\n if (event.button !== undefined && event.button !== 0) return;\n if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;\n\n var target = event.target;\n if (!target || !target.closest) return;\n\n // closest() because the click usually lands on an icon or span INSIDE\n // the anchor, not the anchor itself.\n var link = target.closest('a[href^=\"tel:\"], a[href^=\"TEL:\"]');\n if (!link) return;\n\n var number = normalise(link.getAttribute('href'));\n if (!number) return;\n\n var now = new Date().getTime();\n if (number === lastNumber && (now - lastAt) < DEDUPE_MS) return;\n lastNumber = number;\n lastAt = now;\n\n // PII: if the site shows visitor-specific numbers (an account page, a\n // CRM-driven \"your rep\" number), drop phone_number and link_text here.\n window.dataLayer.push({\n event: 'phone_click',\n phone_number: number,\n // The visible text, useful when a site shows different numbers per\n // location or campaign. Trimmed and capped so a whole button's worth\n // of markup text never lands in the dataLayer.\n link_text: (link.textContent || '').trim().slice(0, 100),\n page_path: window.location.pathname\n });\n } catch (e) {\n // Never throw back into the page's own click handling.\n }\n }\n\n // Bubble phase: a tel: click has no validation to lose a race with, and\n // bubbling means anything that legitimately cancels the click wins first.\n document.addEventListener('click', handleClick, false);\n})();\n</script>"
},
{
- "type": "boolean",
+ "type": "BOOLEAN",
"key": "supportDocumentWrite",
"value": "false"
}
@@ -54,18 +54,18 @@
"containerId": "0",
"triggerId": "2",
"name": "CE - Phone call click",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg0",
"value": "{{_event}}"
},
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg1",
"value": "phone_click"
}
diff --git a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-tally.json b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-tally.json
index 19d85d4..120a533 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-tally.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-tally.json
@@ -55,18 +55,18 @@
"containerId": "0",
"triggerId": "2",
"name": "CE - Tally Form Submitted",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg0",
"value": "{{_event}}"
},
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg1",
"value": "tally_form_submitted"
}
@@ -85,12 +85,12 @@
"type": "v",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "name",
"value": "form_id"
},
{
- "type": "integer",
+ "type": "INTEGER",
"key": "dataLayerVersion",
"value": "2"
}
@@ -104,12 +104,12 @@
"type": "v",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "name",
"value": "form_name"
},
{
- "type": "integer",
+ "type": "INTEGER",
"key": "dataLayerVersion",
"value": "2"
}
diff --git a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-thank-you-page.json b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-thank-you-page.json
index 3873325..d87fbb1 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-thank-you-page.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-thank-you-page.json
@@ -26,12 +26,12 @@
"type": "html",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "html",
"value": "<script>\n(function () {\n if (window.__ctDetectThankYouPage) return;\n window.__ctDetectThankYouPage = true;\n window.dataLayer = window.dataLayer || [];\n\n /* ---------------------------------------------------------------\n EDIT THIS. Paths that mean \"the conversion happened\".\n Matched against location.pathname, case-insensitively, as a\n prefix. '/thank-you' matches '/thank-you' and '/thank-you/order/9'.\n --------------------------------------------------------------- */\n var THANK_YOU_PATHS = [\n '/thank-you',\n '/thanks',\n '/confirmation',\n '/success'\n ];\n\n // Set true only if your confirmation page is genuinely reachable more than\n // once per conversion and you want every view counted. Leave false.\n var COUNT_EVERY_VIEW = false;\n\n var fired = {};\n\n function matches(path) {\n var p = String(path || '').toLowerCase();\n for (var i = 0; i < THANK_YOU_PATHS.length; i++) {\n var want = String(THANK_YOU_PATHS[i] || '').toLowerCase();\n if (want && p.indexOf(want) === 0) return want;\n }\n return null;\n }\n\n function check() {\n try {\n var path = window.location.pathname;\n var matched = matches(path);\n if (!matched) return;\n\n // A refresh or a back-button return to the confirmation page would\n // otherwise count a second conversion for the same lead. Keyed on the\n // full path so two different confirmations still both count.\n if (!COUNT_EVERY_VIEW && fired[path]) return;\n fired[path] = true;\n\n window.dataLayer.push({\n event: 'thank_you_page_view',\n page_path: path,\n matched_rule: matched\n });\n } catch (e) {\n // Never throw back into the page.\n }\n }\n\n // Single-page apps are the reason this is not just a one-shot call. A\n // React, Vue or Next site changes the URL without a page load, so no\n // pageview ever fires and a thank-you page TRIGGER silently counts zero.\n // Wrapping history means we see those route changes too.\n function wrapHistory(method) {\n var original = window.history[method];\n if (typeof original !== 'function') return;\n window.history[method] = function () {\n var result = original.apply(this, arguments);\n try { setTimeout(check, 0); } catch (e) { /* ignore */ }\n return result;\n };\n }\n\n try {\n wrapHistory('pushState');\n wrapHistory('replaceState');\n window.addEventListener('popstate', function () { setTimeout(check, 0); });\n } catch (e) {\n // History API unavailable — the initial check below still runs.\n }\n\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', check);\n } else {\n check();\n }\n})();\n</script>"
},
{
- "type": "boolean",
+ "type": "BOOLEAN",
"key": "supportDocumentWrite",
"value": "false"
}
@@ -54,18 +54,18 @@
"containerId": "0",
"triggerId": "2",
"name": "CE - Thank-you page",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg0",
"value": "{{_event}}"
},
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg1",
"value": "thank_you_page_view"
}
diff --git a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-typeform.json b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-typeform.json
index 79b0f07..5830ece 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-typeform.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-typeform.json
@@ -55,18 +55,18 @@
"containerId": "0",
"triggerId": "2",
"name": "CE - Typeform Submitted",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg0",
"value": "{{_event}}"
},
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg1",
"value": "typeform_form_submitted"
}
@@ -85,12 +85,12 @@
"type": "v",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "name",
"value": "form_id"
},
{
- "type": "integer",
+ "type": "INTEGER",
"key": "dataLayerVersion",
"value": "2"
}
@@ -104,12 +104,12 @@
"type": "v",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "name",
"value": "response_id"
},
{
- "type": "integer",
+ "type": "INTEGER",
"key": "dataLayerVersion",
"value": "2"
}
diff --git a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-webflow-forms.json b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-webflow-forms.json
index 150d895..1f6b172 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-webflow-forms.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-webflow-forms.json
@@ -55,18 +55,18 @@
"containerId": "0",
"triggerId": "2",
"name": "CE - Webflow Form Submitted",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg0",
"value": "{{_event}}"
},
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg1",
"value": "webflow_form_submitted"
}
@@ -85,12 +85,12 @@
"type": "v",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "name",
"value": "form_name"
},
{
- "type": "integer",
+ "type": "INTEGER",
"key": "dataLayerVersion",
"value": "2"
}
diff --git a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-wix-forms.json b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-wix-forms.json
index b095b35..431f0f1 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-wix-forms.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-wix-forms.json
@@ -55,18 +55,18 @@
"containerId": "0",
"triggerId": "2",
"name": "CE - Wix Form Submitted",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg0",
"value": "{{_event}}"
},
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg1",
"value": "wix_form_submitted"
}
@@ -85,12 +85,12 @@
"type": "v",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "name",
"value": "form_id"
},
{
- "type": "integer",
+ "type": "INTEGER",
"key": "dataLayerVersion",
"value": "2"
}
diff --git a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-wix-scheduling.json b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-wix-scheduling.json
index 50d2dda..1c06a31 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-wix-scheduling.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-wix-scheduling.json
@@ -55,18 +55,18 @@
"containerId": "0",
"triggerId": "2",
"name": "CE - Wix Appointment Scheduled",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg0",
"value": "{{_event}}"
},
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg1",
"value": "wix_appointment_scheduled"
}
@@ -85,12 +85,12 @@
"type": "v",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "name",
"value": "booking_id"
},
{
- "type": "integer",
+ "type": "INTEGER",
"key": "dataLayerVersion",
"value": "2"
}
@@ -104,12 +104,12 @@
"type": "v",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "name",
"value": "booking_page_url"
},
{
- "type": "integer",
+ "type": "INTEGER",
"key": "dataLayerVersion",
"value": "2"
}
diff --git a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-wpforms.json b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-wpforms.json
index 7fed252..dae3783 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-wpforms.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-wpforms.json
@@ -55,18 +55,18 @@
"containerId": "0",
"triggerId": "2",
"name": "CE - WPForms Submitted",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg0",
"value": "{{_event}}"
},
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg1",
"value": "wpforms_form_submitted"
}
@@ -85,12 +85,12 @@
"type": "v",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "name",
"value": "form_id"
},
{
- "type": "integer",
+ "type": "INTEGER",
"key": "dataLayerVersion",
"value": "2"
}
diff --git a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-ws-form.json b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-ws-form.json
index 0e929f8..0e04974 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/detect/detect-ws-form.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/detect/detect-ws-form.json
@@ -55,18 +55,18 @@
"containerId": "0",
"triggerId": "2",
"name": "CE - WS Form Submitted",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg0",
"value": "{{_event}}"
},
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg1",
"value": "ws_form_submitted"
}
@@ -85,12 +85,12 @@
"type": "v",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "name",
"value": "form_id"
},
{
- "type": "integer",
+ "type": "INTEGER",
"key": "dataLayerVersion",
"value": "2"
}
diff --git a/skills/conversion-tracking/assets/gtm-recipes/send/ga4.json b/skills/conversion-tracking/assets/gtm-recipes/send/ga4.json
index 54c89d4..a9d6afa 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/send/ga4.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/send/ga4.json
@@ -23,9 +23,9 @@
"name": "GA4 Event - __RECIPE_LABEL__",
"type": "gaawe",
"parameter": [
- { "type": "boolean", "key": "sendEcommerceData", "value": "false" },
- { "type": "template", "key": "eventName", "value": "__GA4_EVENT_NAME__" },
- { "type": "template", "key": "measurementIdOverride", "value": "__GA4_MEASUREMENT_ID__" }
+ { "type": "BOOLEAN", "key": "sendEcommerceData", "value": "false" },
+ { "type": "TEMPLATE", "key": "eventName", "value": "__GA4_EVENT_NAME__" },
+ { "type": "TEMPLATE", "key": "measurementIdOverride", "value": "__GA4_MEASUREMENT_ID__" }
],
"firingTriggerId": ["201"],
"tagFiringOption": "ONCE_PER_EVENT",
@@ -39,13 +39,13 @@
"containerId": "0",
"triggerId": "201",
"name": "CE - __RECIPE_LABEL__",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
- { "type": "template", "key": "arg0", "value": "{{_event}}" },
- { "type": "template", "key": "arg1", "value": "__DETECTION_EVENT__" }
+ { "type": "TEMPLATE", "key": "arg0", "value": "{{_event}}" },
+ { "type": "TEMPLATE", "key": "arg1", "value": "__DETECTION_EVENT__" }
]
}
],
diff --git a/skills/conversion-tracking/assets/gtm-recipes/send/google-ads.json b/skills/conversion-tracking/assets/gtm-recipes/send/google-ads.json
index 0f6cd65..1e9cf5e 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/send/google-ads.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/send/google-ads.json
@@ -23,9 +23,9 @@
"name": "Conversion Linker",
"type": "gclidw",
"parameter": [
- { "type": "boolean", "key": "enableCrossDomain", "value": "false" },
- { "type": "boolean", "key": "enableUrlPassthrough", "value": "false" },
- { "type": "boolean", "key": "enableCookieOverrides", "value": "false" }
+ { "type": "BOOLEAN", "key": "enableCrossDomain", "value": "false" },
+ { "type": "BOOLEAN", "key": "enableUrlPassthrough", "value": "false" },
+ { "type": "BOOLEAN", "key": "enableCookieOverrides", "value": "false" }
],
"firingTriggerId": ["2147479553"],
"tagFiringOption": "ONCE_PER_EVENT",
@@ -39,11 +39,11 @@
"name": "Google Ads Conversion - __RECIPE_LABEL__",
"type": "awct",
"parameter": [
- { "type": "boolean", "key": "enableConversionLinker", "value": "true" },
- { "type": "template", "key": "conversionCookiePrefix", "value": "_gcl" },
- { "type": "template", "key": "conversionId", "value": "__GOOGLE_ADS_CONVERSION_ID__" },
- { "type": "template", "key": "conversionLabel", "value": "__GOOGLE_ADS_CONVERSION_LABEL__" },
- { "type": "boolean", "key": "rdp", "value": "false" }
+ { "type": "BOOLEAN", "key": "enableConversionLinker", "value": "true" },
+ { "type": "TEMPLATE", "key": "conversionCookiePrefix", "value": "_gcl" },
+ { "type": "TEMPLATE", "key": "conversionId", "value": "__GOOGLE_ADS_CONVERSION_ID__" },
+ { "type": "TEMPLATE", "key": "conversionLabel", "value": "__GOOGLE_ADS_CONVERSION_LABEL__" },
+ { "type": "BOOLEAN", "key": "rdp", "value": "false" }
],
"firingTriggerId": ["201"],
"tagFiringOption": "ONCE_PER_EVENT",
@@ -57,13 +57,13 @@
"containerId": "0",
"triggerId": "201",
"name": "CE - __RECIPE_LABEL__",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
- { "type": "template", "key": "arg0", "value": "{{_event}}" },
- { "type": "template", "key": "arg1", "value": "__DETECTION_EVENT__" }
+ { "type": "TEMPLATE", "key": "arg0", "value": "{{_event}}" },
+ { "type": "TEMPLATE", "key": "arg1", "value": "__DETECTION_EVENT__" }
]
}
],
diff --git a/skills/conversion-tracking/assets/gtm-recipes/send/linkedin.json b/skills/conversion-tracking/assets/gtm-recipes/send/linkedin.json
index 8440b7a..2adda90 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/send/linkedin.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/send/linkedin.json
@@ -26,12 +26,12 @@
"type": "html",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "html",
"value": "<script>\n(function () {\n window._linkedin_partner_id = '__LINKEDIN_PARTNER_ID__';\n window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [];\n window._linkedin_data_partner_ids.push(window._linkedin_partner_id);\n if (window.lintrk) { return; }\n window.lintrk = function (a, b) { window.lintrk.q.push([a, b]); };\n window.lintrk.q = [];\n var s = document.getElementsByTagName('script')[0];\n var t = document.createElement('script');\n t.type = 'text/javascript'; t.async = true;\n t.src = 'https://snap.licdn.com/li.lms-analytics/insight.min.js';\n s.parentNode.insertBefore(t, s);\n})();\n</script>"
},
{
- "type": "boolean",
+ "type": "BOOLEAN",
"key": "supportDocumentWrite",
"value": "false"
}
@@ -64,12 +64,12 @@
"type": "html",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "html",
"value": "<script>\n(function () {\n if (typeof window.lintrk !== 'function') { return; }\n window.lintrk('track', { conversion_id: __LINKEDIN_CONVERSION_ID__ });\n})();\n</script>"
},
{
- "type": "boolean",
+ "type": "BOOLEAN",
"key": "supportDocumentWrite",
"value": "false"
}
@@ -101,18 +101,18 @@
"containerId": "0",
"triggerId": "201",
"name": "CE - __RECIPE_LABEL__",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg0",
"value": "{{_event}}"
},
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg1",
"value": "__DETECTION_EVENT__"
}
diff --git a/skills/conversion-tracking/assets/gtm-recipes/send/meta.json b/skills/conversion-tracking/assets/gtm-recipes/send/meta.json
index fd6810f..c7cb223 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/send/meta.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/send/meta.json
@@ -26,12 +26,12 @@
"type": "html",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "html",
"value": "<script>\n(function () {\n /* Guard: never initialise a second pixel. Two fbq('init') calls on one page\n is a top cause of doubled Meta conversions. If a pixel already exists,\n delete this tag after import rather than relying on the guard alone. */\n if (window.fbq) { return; }\n !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;\n n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;\n t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,\n document,'script','https://connect.facebook.net/en_US/fbevents.js');\n fbq('init', '__META_PIXEL_ID__');\n fbq('track', 'PageView');\n})();\n</script>"
},
{
- "type": "boolean",
+ "type": "BOOLEAN",
"key": "supportDocumentWrite",
"value": "false"
}
@@ -64,12 +64,12 @@
"type": "html",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "html",
"value": "<script>\n(function () {\n if (typeof window.fbq !== 'function') { return; }\n /* eventID lets a server-side Conversions API copy of this same conversion\n deduplicate against the browser copy. Harmless if no CAPI is connected. */\n var eventId = 'ck-' + Date.now() + '-' + Math.random().toString(36).slice(2, 10);\n window.fbq('track', '__META_EVENT_NAME__', {}, { eventID: eventId });\n})();\n</script>"
},
{
- "type": "boolean",
+ "type": "BOOLEAN",
"key": "supportDocumentWrite",
"value": "false"
}
@@ -101,18 +101,18 @@
"containerId": "0",
"triggerId": "201",
"name": "CE - __RECIPE_LABEL__",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg0",
"value": "{{_event}}"
},
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg1",
"value": "__DETECTION_EVENT__"
}
diff --git a/skills/conversion-tracking/assets/gtm-recipes/send/microsoft.json b/skills/conversion-tracking/assets/gtm-recipes/send/microsoft.json
index 8da6ec0..11db32d 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/send/microsoft.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/send/microsoft.json
@@ -26,12 +26,12 @@
"type": "html",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "html",
"value": "<script>\n(function (w, d, t, r, u) {\n if (w.uetq && w.uetq.push !== Array.prototype.push) { return; }\n var f, n, i;\n w[u] = w[u] || [];\n f = function () { var o = { ti: '__MICROSOFT_UET_TAG_ID__', enableAutoSpaTracking: true }; o.q = w[u]; w[u] = new UET(o); w[u].push('pageLoad'); };\n n = d.createElement(t); n.src = r; n.async = 1;\n n.onload = n.onreadystatechange = function () {\n var s = this.readyState;\n if (s && s !== 'loaded' && s !== 'complete') { return; }\n f(); n.onload = n.onreadystatechange = null;\n };\n i = d.getElementsByTagName(t)[0];\n i.parentNode.insertBefore(n, i);\n})(window, document, 'script', '//bat.bing.com/bat.js', 'uetq');\n</script>"
},
{
- "type": "boolean",
+ "type": "BOOLEAN",
"key": "supportDocumentWrite",
"value": "false"
}
@@ -64,12 +64,12 @@
"type": "html",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "html",
"value": "<script>\n(function () {\n window.uetq = window.uetq || [];\n /* Microsoft matches event goals on Action, Category and Label. This must\n match the goal you created in the UET conversion goal screen exactly,\n and it is case sensitive. */\n window.uetq.push('event', '__MICROSOFT_EVENT_ACTION__', { event_category: 'conversion' });\n})();\n</script>"
},
{
- "type": "boolean",
+ "type": "BOOLEAN",
"key": "supportDocumentWrite",
"value": "false"
}
@@ -101,18 +101,18 @@
"containerId": "0",
"triggerId": "201",
"name": "CE - __RECIPE_LABEL__",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg0",
"value": "{{_event}}"
},
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg1",
"value": "__DETECTION_EVENT__"
}
diff --git a/skills/conversion-tracking/assets/gtm-recipes/send/tiktok.json b/skills/conversion-tracking/assets/gtm-recipes/send/tiktok.json
index be59ac8..1c9c3ba 100644
--- a/skills/conversion-tracking/assets/gtm-recipes/send/tiktok.json
+++ b/skills/conversion-tracking/assets/gtm-recipes/send/tiktok.json
@@ -26,12 +26,12 @@
"type": "html",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "html",
"value": "<script>\n(function (w, d, t) {\n if (w.ttq) { return; }\n w.TiktokAnalyticsObject = t;\n var ttq = w[t] = w[t] || [];\n ttq.methods = ['page','track','identify','instances','debug','on','off','once','ready','alias','group','enableCookie','disableCookie'];\n ttq.setAndDefer = function (obj, m) { obj[m] = function () { obj.push([m].concat(Array.prototype.slice.call(arguments, 0))); }; };\n for (var i = 0; i < ttq.methods.length; i++) { ttq.setAndDefer(ttq, ttq.methods[i]); }\n ttq.instance = function (id) {\n var inst = ttq._i[id] || [];\n for (var j = 0; j < ttq.methods.length; j++) { ttq.setAndDefer(inst, ttq.methods[j]); }\n return inst;\n };\n ttq.load = function (id, opts) {\n var url = 'https://analytics.tiktok.com/i18n/pixel/events.js';\n ttq._i = ttq._i || {}; ttq._i[id] = []; ttq._i[id]._u = url;\n ttq._t = ttq._t || {}; ttq._t[id] = +new Date();\n ttq._o = ttq._o || {}; ttq._o[id] = opts || {};\n var s = d.createElement('script');\n s.type = 'text/javascript'; s.async = true; s.src = url + '?sdkid=' + id + '&lib=' + t;\n var f = d.getElementsByTagName('script')[0];\n f.parentNode.insertBefore(s, f);\n };\n ttq.load('__TIKTOK_PIXEL_ID__');\n ttq.page();\n})(window, document, 'ttq');\n</script>"
},
{
- "type": "boolean",
+ "type": "BOOLEAN",
"key": "supportDocumentWrite",
"value": "false"
}
@@ -64,12 +64,12 @@
"type": "html",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "html",
"value": "<script>\n(function () {\n if (!window.ttq || typeof window.ttq.track !== 'function') { return; }\n window.ttq.track('__TIKTOK_EVENT_NAME__');\n})();\n</script>"
},
{
- "type": "boolean",
+ "type": "BOOLEAN",
"key": "supportDocumentWrite",
"value": "false"
}
@@ -101,18 +101,18 @@
"containerId": "0",
"triggerId": "201",
"name": "CE - __RECIPE_LABEL__",
- "type": "customEvent",
+ "type": "CUSTOM_EVENT",
"customEventFilter": [
{
- "type": "equals",
+ "type": "EQUALS",
"parameter": [
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg0",
"value": "{{_event}}"
},
{
- "type": "template",
+ "type": "TEMPLATE",
"key": "arg1",
"value": "__DETECTION_EVENT__"
}
diff --git a/skills/conversion-tracking/scripts/build_recipe.py b/skills/conversion-tracking/scripts/build_recipe.py
index 84eeed5..f58580f 100644
--- a/skills/conversion-tracking/scripts/build_recipe.py
+++ b/skills/conversion-tracking/scripts/build_recipe.py
@@ -175,7 +175,9 @@ def main():
# The detect recipe already has a custom-event trigger on the tool's
# event; rewire the send tags to it and drop the template's duplicate.
- detect_trigger = next(t for t in dcv["trigger"] if t["type"] == "customEvent")
+ # Recipes use Tag Manager's import format (CUSTOM_EVENT). The API spelling
+ # (customEvent) is accepted too, for any older copy.
+ detect_trigger = next(t for t in dcv["trigger"] if t["type"] in ("CUSTOM_EVENT", "customEvent"))
send_trigger_ids = {t["triggerId"] for t in scv.get("trigger", [])}
next_id = 1000