Skill Tracer
Skills › Marketing Skills › conversion-tracking › detect-forminator.json

detect-forminator.json

103 lines · skills/conversion-tracking/assets/gtm-recipes/detect/detect-forminator.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 - Forminator",
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 - Forminator Submission Listener",
27 "type": "html",
28 "parameter": [
29 {
30 "type": "TEMPLATE",
31 "key": "html",
32 "value": "<script>\n(function () {\n if (window.__ctForminatorForms) return;\n window.__ctForminatorForms = true;\n window.dataLayer = window.dataLayer || [];\n var listeners=[],lastEvent=null;\n window.__ctForminatorSubscribe=function(listener){if(listener&&typeof listener==='object')listeners.push(listener);};\n function isForm(form){\n try{return !!(form&&String(form.tagName||'').toLowerCase()==='form'&&form.classList&&form.classList.contains('forminator-custom-form'));}\n catch(e){return false;}\n }\n function notify(phase,form,candidate,event){\n var handled=false;\n for(var i=0;i<listeners.length;i++)try{var fn=listeners[i]&&listeners[i][phase];if(typeof fn==='function'&&fn(form,candidate,event)===true)handled=true;}catch(e){}\n return handled;\n }\n function submit(event){try{var form=event.target;if(isForm(form))notify('beforeAttempt',form,false,event);}catch(e){}}\n function success(event){\n try{\n if(event&&typeof event==='object'&&event===lastEvent)return;\n lastEvent=event;\n if(event&&typeof event==='object')setTimeout(function(){if(lastEvent===event)lastEvent=null;},0);\n var form=event&&event.target;if(!isForm(form))return;\n if(!notify('onCandidate',form,true,event))window.dataLayer.push({event:'forminator_form_submitted',form_id:form.getAttribute('data-form-id')||''});\n }catch(e){}\n }\n document.addEventListener('submit',submit,true);\n // Page-reload forms render their verdict in the returned page instead of\n // emitting the AJAX event. Read only the confirmation class and form ID.\n var confirmedForms=[];\n function nativeConfirmations(){\n try{\n var forms=document.querySelectorAll('form.forminator-custom-form:not(.forminator_ajax)');\n for(var i=0;i<forms.length;i++){\n var form=forms[i],message=form.querySelector('.forminator-response-message.forminator-success');\n if(!message||!message.getClientRects().length||confirmedForms.indexOf(form)!==-1)continue;\n confirmedForms.push(form);\n success({target:form});\n }\n }catch(e){}\n }\n function watchNative(){\n nativeConfirmations();\n if(window.MutationObserver&&document.documentElement){\n new MutationObserver(nativeConfirmations).observe(document.documentElement,{childList:true,subtree:true,attributes:true,attributeFilter:['class','style']});\n }\n }\n if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',watchNative);\n else watchNative();\n window.addEventListener('load',nativeConfirmations);\n function hook(){\n try{\n if(window.__ctForminatorSuccessHooked)return true;\n var jq=window.jQuery||(typeof jQuery!=='undefined'?jQuery:(typeof $!=='undefined'?$:null));\n if(!jq)return false;\n window.__ctForminatorSuccessHooked=true;\n jq(document).on('forminator:form:submit:success',success);return true;\n }catch(e){return false;}\n }\n if(!hook()){document.addEventListener('DOMContentLoaded',hook);window.addEventListener('load',hook);}\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 - Forminator 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": "forminator_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 - Forminator 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 }