Skip to content

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

5.6 KB
Raw Blame
{
  "exportFormatVersion": 2,
  "exportTime": "2026-07-02 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 - Webflow 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 - Webflow Forms Submission Listener",
        "type": "html",
        "parameter": [
          {
            "type": "TEMPLATE",
            "key": "html",
            "value": "<script>\n(function () {\n  if (window.__ctWebflowForms) return;\n  window.__ctWebflowForms = true;\n  window.dataLayer = window.dataLayer || [];\n  var listeners = [], timeout = 30000;\n  window.__ctWebflowSubscribe = function (listener) {\n    if (listener && typeof listener === 'object') listeners.push(listener);\n  };\n  function isForm(form) {\n    try { return !!(form && String(form.tagName || '').toLowerCase() === 'form' && form.closest && form.closest('.w-form')); }\n    catch (e) { return false; }\n  }\n  function notify(phase, form, candidate) {\n    var handled = false;\n    for (var i=0;i<listeners.length;i++) {\n      try { var fn=listeners[i] && listeners[i][phase]; if (typeof fn==='function' && fn(form,candidate)===true) handled=true; } catch(e) {}\n    }\n    return handled;\n  }\n  function visible(el) { try { return !!el && window.getComputedStyle(el).display !== 'none'; } catch(e) { return false; } }\n  function emit(form) {\n    var name=''; try { name=form.getAttribute('data-name') || form.id || ''; } catch(e) {}\n    if (!notify('onCandidate', form, true)) window.dataLayer.push({event:'webflow_form_submitted',form_name:name});\n  }\n  function submit(event) {\n    try {\n      var form=event.target; if (!isForm(form)) return;\n      notify('beforeAttempt', form, false);\n      var wrap=form.closest('.w-form'), done=wrap.querySelector('.w-form-done'), fail=wrap.querySelector('.w-form-fail');\n      if (!done) return;\n      var old=form.__ctWebflowWatch;\n      if (old) { notify('onOverlap', form, false); old.cancel(false); form.__ctWebflowWatch=null; }\n      var staleFail=visible(fail), settled=false, observer=null, poll=null, kill=null, jq=window.jQuery;\n      function stop(rejected) { if(settled)return; settled=true; if(observer)try{observer.disconnect();}catch(e){} if(jq)jq(document).off('ajaxComplete',check); if(poll)clearInterval(poll); if(kill)clearTimeout(kill); if(form.__ctWebflowWatch===state)form.__ctWebflowWatch=null; if(rejected)notify('onRejected',form,false); }\n      var state={cancel:function(){stop(false);}};\n      function check() {\n        if(settled)return;\n        // Webflow sets success only after its server accepts the form. A redirect\n        // skips the success box, so check that state after its AJAX callback.\n        var wf=jq && jq(form).data('.w-form');\n        if(wf && wf.form && wf.form[0]===form && wf.redirect && wf.success===true){ stop(); emit(form); return; }\n        if(visible(done)){ stop(); emit(form); return; }\n        if(!visible(fail)){staleFail=false;return;}\n        if(!staleFail)stop(true);\n      }\n      if(typeof MutationObserver==='function'){observer=new MutationObserver(check);observer.observe(wrap,{attributes:true,attributeFilter:['style','class'],subtree:true,childList:true});}\n      if(jq)jq(document).on('ajaxComplete',check);\n      poll=setInterval(check,300); kill=setTimeout(function(){stop(true);},timeout); form.__ctWebflowWatch=state;\n    } catch(e) {}\n  }\n  if(typeof document!=='undefined'&&document.addEventListener)document.addEventListener('submit',submit,true);\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 - Webflow Form Submitted",
        "type": "CUSTOM_EVENT",
        "customEventFilter": [
          {
            "type": "EQUALS",
            "parameter": [
              {
                "type": "TEMPLATE",
                "key": "arg0",
                "value": "{{_event}}"
              },
              {
                "type": "TEMPLATE",
                "key": "arg1",
                "value": "webflow_form_submitted"
              }
            ]
          }
        ],
        "filter": []
      }
    ],
    "variable": [
      {
        "accountId": "0",
        "containerId": "0",
        "variableId": "1",
        "name": "DLV - Webflow 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"
  }
}