Skip to content

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

4.7 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 - WS Form",
      "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 - WS Form Submission Listener",
        "type": "html",
        "parameter": [
          {
            "type": "TEMPLATE",
            "key": "html",
            "value": "<script>\n(function () {\n  if (window.__ctDetectWsForm) return;\n  window.__ctDetectWsForm = true;\n  window.dataLayer = window.dataLayer || [];\n  var seenEvents = typeof WeakSet === 'function' ? new WeakSet() : null;\n  var lastSuccessByInstance = {};\n  function unwrap(value) { return value && value.jquery ? value[0] : (value && value[0] && value[0].nodeType ? value[0] : value); }\n  function onAcceptedSubmit(event, formObject, formId, instanceId, formEl) {\n    if (event && seenEvents) {\n      if (seenEvents.has(event)) return;\n      seenEvents.add(event);\n    }\n    var form = unwrap(formEl);\n    if (!form || !form.matches || !form.matches('form.wsf-form')) return;\n    var id;\n    if (typeof formId === 'string') {\n      if (!/^\\d+$/.test(formId) || Number(formId) < 1) return;\n      id = formId;\n    } else if (typeof formId === 'number') {\n      if (!isFinite(formId) || Math.floor(formId) !== formId || formId < 1) return;\n      id = String(formId);\n    } else {\n      return;\n    }\n    // WS Form can finish both requests from a double-click. Count the rapid\n    // success callbacks once, without changing the form or reading answers.\n    var instance = typeof instanceId === 'string' || typeof instanceId === 'number' ? instanceId : '';\n    var key = id + ':' + instance;\n    var now = Date.now();\n    if (lastSuccessByInstance[key] !== undefined && now - lastSuccessByInstance[key] < 2000) return;\n    lastSuccessByInstance[key] = now;\n    var adapter = window.__ctWsFormMethod2Emit;\n    if (typeof adapter === 'function') {\n      try { if (adapter(form, id, instanceId) === true) return; }\n      catch (e) { return; }\n    }\n    window.dataLayer.push({ event: 'ws_form_submitted', form_id: id });\n  }\n  var handlerBound = false;\n  function hook() {\n    if (handlerBound) return true;\n    var jq = typeof jQuery !== 'undefined' ? jQuery : (typeof $ !== 'undefined' ? $ : null);\n    if (!jq) return false;\n    jq(document).on('wsf-submit-success', onAcceptedSubmit);\n    handlerBound = true;\n    return true;\n  }\n  if (!hook()) {\n    document.addEventListener('DOMContentLoaded', hook, { once: true });\n    window.addEventListener('load', hook, { once: true });\n  }\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 - WS Form Submitted",
        "type": "CUSTOM_EVENT",
        "customEventFilter": [
          {
            "type": "EQUALS",
            "parameter": [
              {
                "type": "TEMPLATE",
                "key": "arg0",
                "value": "{{_event}}"
              },
              {
                "type": "TEMPLATE",
                "key": "arg1",
                "value": "ws_form_submitted"
              }
            ]
          }
        ],
        "filter": []
      }
    ],
    "variable": [
      {
        "accountId": "0",
        "containerId": "0",
        "variableId": "1",
        "name": "DLV - WS Form ID",
        "type": "v",
        "parameter": [
          {
            "type": "TEMPLATE",
            "key": "name",
            "value": "form_id"
          },
          {
            "type": "INTEGER",
            "key": "dataLayerVersion",
            "value": "2"
          }
        ]
      }
    ],
    "fingerprint": "0",
    "tagManagerUrl": "https://tagmanager.google.com/#/container/accounts/0/containers/0/workspaces/0"
  }
}