Skills › Marketing Skills › conversion-tracking › detect-divi-forms.json
detect-divi-forms.json
103 lines · skills/conversion-tracking/assets/gtm-recipes/detect/detect-divi-forms.json at 88c79f6
1{
2 "exportFormatVersion": 2,
3 "exportTime": "2026-07-02 00:00:00",
4 "containerVersion": {
5 "path": "accounts/0/containers/0/versions/0",
6 "accountId": "0",
7 "containerId": "0",
8 "containerVersionId": "0",
9 "container": {
10 "path": "accounts/0/containers/0",
11 "accountId": "0",
12 "containerId": "0",
13 "name": "Conversion Detection - Divi Forms",
14 "publicId": "GTM-XXXXXXX",
15 "usageContext": [
16 "WEB"
17 ],
18 "fingerprint": "0",
19 "tagManagerUrl": "https://tagmanager.google.com/#/container/accounts/0/containers/0/workspaces/0"
20 },
21 "tag": [
22 {
23 "accountId": "0",
24 "containerId": "0",
25 "tagId": "1",
26 "name": "Conversion Detection - Divi Forms Submission Listener",
27 "type": "html",
28 "parameter": [
29 {
30 "type": "TEMPLATE",
31 "key": "html",
32 "value": "<script>\n(function () {\n if (window.__ctDetectDiviForms) return;\n window.__ctDetectDiviForms = true;\n window.dataLayer = window.dataLayer || [];\n var reported = typeof WeakSet === 'function' ? new WeakSet() : null;\n function inspect(container) {\n if (!container || !container.querySelector) return;\n var notice;\n try {\n notice = container.querySelector('.et-pb-contact-message.et_pb_success_message');\n if (!notice || container.querySelector('form.et_pb_contact_form') ||\n container.querySelector('.et_pb_contact_error_meesage') ||\n container.querySelector('.et_contact_error')) return;\n } catch (e) { return; }\n if (reported && reported.has(notice)) return;\n if (reported) reported.add(notice);\n var id = container.id || (container.getAttribute && container.getAttribute('data-id')) || '';\n if (!id) return;\n var adapter = window.__ctDiviMethod2Emit;\n if (typeof adapter === 'function' && adapter(container, String(id)) === true) return;\n window.dataLayer.push({ event: 'divi_form_submitted', form_id: String(id) });\n }\n function observe(container) {\n if (!container || container.__ctDiviObserved || typeof MutationObserver === 'undefined') return;\n container.__ctDiviObserved = true;\n new MutationObserver(function () { inspect(container); }).observe(container,\n { childList: true, subtree: true, attributes: true, attributeFilter: ['class'] });\n inspect(container);\n }\n function start() {\n var existing = document.querySelectorAll('.et_pb_contact_form_container');\n for (var i = 0; i < existing.length; i++) observe(existing[i]);\n if (typeof MutationObserver !== 'undefined' && document.documentElement) {\n new MutationObserver(function (records) {\n for (var r = 0; r < records.length; r++) {\n for (var n = 0; n < records[r].addedNodes.length; n++) {\n var node = records[r].addedNodes[n];\n if (node.nodeType !== 1) continue;\n if (node.matches && node.matches('.et_pb_contact_form_container')) observe(node);\n var nested = node.querySelectorAll ? node.querySelectorAll('.et_pb_contact_form_container') : [];\n for (var j = 0; j < nested.length; j++) observe(nested[j]);\n }\n }\n }).observe(document.documentElement, { childList: true, subtree: true });\n }\n }\n if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', start, { once: true });\n else start();\n})();\n</script>"
33 },
34 {
35 "type": "BOOLEAN",
36 "key": "supportDocumentWrite",
37 "value": "false"
38 }
39 ],
40 "firingTriggerId": [
41 "2147479553"
42 ],
43 "tagFiringOption": "ONCE_PER_EVENT",
44 "monitoringMetadata": {
45 "type": "MAP"
46 },
47 "consentSettings": {
48 "consentStatus": "NOT_SET"
49 }
50 }
51 ],
52 "trigger": [
53 {
54 "accountId": "0",
55 "containerId": "0",
56 "triggerId": "2",
57 "name": "CE - Divi Forms Submitted",
58 "type": "CUSTOM_EVENT",
59 "customEventFilter": [
60 {
61 "type": "EQUALS",
62 "parameter": [
63 {
64 "type": "TEMPLATE",
65 "key": "arg0",
66 "value": "{{_event}}"
67 },
68 {
69 "type": "TEMPLATE",
70 "key": "arg1",
71 "value": "divi_form_submitted"
72 }
73 ]
74 }
75 ],
76 "filter": []
77 }
78 ],
79 "variable": [
80 {
81 "accountId": "0",
82 "containerId": "0",
83 "variableId": "1",
84 "name": "DLV - Divi Form ID",
85 "type": "v",
86 "parameter": [
87 {
88 "type": "TEMPLATE",
89 "key": "name",
90 "value": "form_id"
91 },
92 {
93 "type": "INTEGER",
94 "key": "dataLayerVersion",
95 "value": "2"
96 }
97 ]
98 }
99 ],
100 "fingerprint": "0",
101 "tagManagerUrl": "https://tagmanager.google.com/#/container/accounts/0/containers/0/workspaces/0"
102 }
103}