{
  "$meta": {
    "package": "@walkeros/web-destination-fullstory",
    "version": "4.2.1",
    "type": "destination",
    "platform": [
      "web"
    ],
    "docs": "https://www.walkeros.io/docs/destinations/web/fullstory",
    "source": "https://github.com/elbwalker/walkerOS/tree/main/packages/web/destinations/fullstory/src"
  },
  "schemas": {
    "mapping": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "identify": {
          "description": "Per-event identity mapping. Resolves to { uid, properties? } for FullStory setIdentity. Overrides destination-level identify for this event."
        },
        "set": {
          "description": "Property mapping. Resolved object keys become FullStory setProperties() properties. Use with setType to control scope."
        },
        "setType": {
          "type": "string",
          "enum": [
            "user",
            "page"
          ],
          "description": "Property scope for the set mapping. \"user\" persists across sessions; \"page\" resets on navigation. Default: \"user\"."
        }
      },
      "additionalProperties": false
    },
    "settings": {
      "$schema": "http://json-schema.org/draft-07/schema#",
      "type": "object",
      "properties": {
        "orgId": {
          "type": "string",
          "minLength": 1,
          "description": "Your FullStory organization ID (e.g. \"o-XXXXXX-na1\"). Find it in FullStory under Settings > General."
        },
        "host": {
          "type": "string",
          "description": "Recording server host for proxy support."
        },
        "script": {
          "type": "string",
          "description": "Custom script CDN host domain."
        },
        "cookieDomain": {
          "type": "string",
          "description": "Override cookie domain for cross-subdomain tracking."
        },
        "debug": {
          "type": "boolean",
          "description": "Enable browser console debug logging."
        },
        "devMode": {
          "type": "boolean",
          "description": "Disable recording entirely for development environments."
        },
        "startCaptureManually": {
          "type": "boolean",
          "description": "Delay capture until FullStory(\"start\") is called. Recommended for GDPR: init the SDK immediately but wait for consent before recording."
        },
        "namespace": {
          "type": "string",
          "description": "Global FS identifier override (default: \"FS\")."
        },
        "recordCrossDomainIFrames": {
          "type": "boolean",
          "description": "Enable cross-domain iframe recording."
        },
        "identify": {
          "description": "Destination-level identity mapping. Resolves to { uid, properties? } for FullStory setIdentity. Fires on every push."
        },
        "consent": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "string",
            "enum": [
              "capture",
              "consent"
            ]
          },
          "description": "Translation table from walkerOS consent keys to FullStory consent actions. \"capture\" controls start/shutdown (recording on/off). \"consent\" controls setIdentity({ consent }) flag. Example: { \"analytics\": \"capture\" }."
        }
      },
      "required": [
        "orgId"
      ],
      "additionalProperties": false
    }
  },
  "examples": {
    "env": {
      "init": {
        "fullstory": {
          "init": {
            "$code": "()=>{}"
          },
          "trackEvent": {
            "$code": "()=>{}"
          },
          "setIdentity": {
            "$code": "()=>{}"
          },
          "setProperties": {
            "$code": "()=>{}"
          },
          "shutdown": {
            "$code": "()=>{}"
          },
          "start": {
            "$code": "()=>{}"
          }
        }
      },
      "push": {
        "fullstory": {
          "init": {
            "$code": "()=>{}"
          },
          "trackEvent": {
            "$code": "()=>{}"
          },
          "setIdentity": {
            "$code": "()=>{}"
          },
          "setProperties": {
            "$code": "()=>{}"
          },
          "shutdown": {
            "$code": "()=>{}"
          },
          "start": {
            "$code": "()=>{}"
          }
        }
      },
      "simulation": [
        "call:fullstory.init",
        "call:fullstory.trackEvent",
        "call:fullstory.setIdentity",
        "call:fullstory.setProperties",
        "call:fullstory.shutdown",
        "call:fullstory.start"
      ]
    },
    "step": {
      "combinedFeatures": {
        "title": "Combined features",
        "description": "A purchase fires FullStory setIdentity, setProperties, and trackEvent in the canonical execution order.",
        "in": {
          "name": "order complete",
          "data": {
            "id": "0rd3r1d",
            "currency": "EUR",
            "shipping": 5.22,
            "taxes": 73.76,
            "total": 555
          },
          "context": {
            "shopping": [
              "complete",
              0
            ]
          },
          "globals": {
            "pagegroup": "shop"
          },
          "custom": {
            "completely": "random"
          },
          "user": {
            "id": "us3r",
            "device": "c00k13",
            "session": "s3ss10n"
          },
          "nested": [
            {
              "entity": "product",
              "data": {
                "id": "ers",
                "name": "Everyday Ruck Snack",
                "color": "black",
                "size": "l",
                "price": 420
              },
              "context": {
                "shopping": [
                  "complete",
                  0
                ]
              },
              "nested": []
            },
            {
              "entity": "product",
              "data": {
                "id": "cc",
                "name": "Cool Cap",
                "size": "one size",
                "price": 42
              },
              "context": {
                "shopping": [
                  "complete",
                  0
                ]
              },
              "nested": []
            },
            {
              "entity": "gift",
              "data": {
                "name": "Surprise"
              },
              "context": {
                "shopping": [
                  "complete",
                  0
                ]
              },
              "nested": []
            }
          ],
          "consent": {
            "functional": true
          },
          "id": "810a09d5be3b77c5",
          "trigger": "load",
          "entity": "order",
          "action": "complete",
          "timestamp": 1700000107,
          "timing": 3.14,
          "source": {
            "count": 1,
            "trace": "0a1b2c3d4e5f60718293a4b5c6d7e8f9",
            "type": "collector",
            "schema": "4"
          }
        },
        "mapping": {
          "name": "Purchase",
          "settings": {
            "identify": {
              "map": {
                "uid": "user.id"
              }
            },
            "set": {
              "map": {
                "order_id": "data.id"
              }
            }
          }
        },
        "out": [
          [
            "fullstory.setIdentity",
            {
              "uid": "us3r"
            }
          ],
          [
            "fullstory.setProperties",
            {
              "type": "user",
              "properties": {
                "order_id": "0rd3r1d"
              }
            }
          ],
          [
            "fullstory.trackEvent",
            {
              "name": "Purchase",
              "properties": {}
            }
          ]
        ]
      },
      "consentGrantCapture": {
        "title": "Start capture",
        "description": "A walker consent grant for analytics calls FullStory start to resume session recording.",
        "command": "consent",
        "in": {
          "analytics": true
        },
        "settings": {
          "consent": {
            "analytics": "capture"
          }
        },
        "out": [
          [
            "fullstory.start"
          ]
        ]
      },
      "consentGrantFlag": {
        "title": "Consent flag granted",
        "description": "A walker consent grant with action consent sets the FullStory identity consent flag to true.",
        "command": "consent",
        "in": {
          "marketing": true
        },
        "settings": {
          "consent": {
            "marketing": "consent"
          }
        },
        "out": [
          [
            "fullstory.setIdentity",
            {
              "consent": true
            }
          ]
        ]
      },
      "consentRevokeCapture": {
        "title": "Shutdown capture",
        "description": "A walker consent revoke for analytics calls FullStory shutdown to stop session recording.",
        "command": "consent",
        "before": {
          "analytics": true
        },
        "in": {
          "analytics": false
        },
        "settings": {
          "consent": {
            "analytics": "capture"
          }
        },
        "out": [
          [
            "fullstory.start"
          ],
          [
            "fullstory.shutdown"
          ]
        ]
      },
      "consentRevokeFlag": {
        "title": "Consent flag revoked",
        "description": "A walker consent revoke with action consent sets the FullStory identity consent flag to false.",
        "command": "consent",
        "before": {
          "marketing": true
        },
        "in": {
          "marketing": false
        },
        "settings": {
          "consent": {
            "marketing": "consent"
          }
        },
        "out": [
          [
            "fullstory.setIdentity",
            {
              "consent": true
            }
          ],
          [
            "fullstory.setIdentity",
            {
              "consent": false
            }
          ]
        ]
      },
      "defaultEventForwarding": {
        "title": "Default event",
        "description": "A walker event becomes a FullStory trackEvent call with the event name and empty properties.",
        "in": {
          "name": "product view",
          "data": {
            "id": "ers",
            "name": "Everyday Ruck Snack",
            "color": "black",
            "size": "l",
            "price": 420
          },
          "context": {
            "shopping": [
              "detail",
              0
            ]
          },
          "globals": {
            "pagegroup": "shop"
          },
          "custom": {
            "completely": "random"
          },
          "user": {
            "id": "us3r",
            "device": "c00k13",
            "session": "s3ss10n"
          },
          "nested": [],
          "consent": {
            "functional": true
          },
          "id": "ae20526fa4c56d47",
          "trigger": "load",
          "entity": "product",
          "action": "view",
          "timestamp": 1700000100,
          "timing": 3.14,
          "source": {
            "count": 1,
            "trace": "0a1b2c3d4e5f60718293a4b5c6d7e8f9",
            "type": "collector",
            "schema": "4"
          }
        },
        "out": [
          [
            "fullstory.trackEvent",
            {
              "name": "product view",
              "properties": {}
            }
          ]
        ]
      },
      "destinationLevelIdentify": {
        "title": "Destination identify",
        "description": "Destination-level identify fires FullStory setIdentity with the user id before every track call.",
        "in": {
          "name": "page view",
          "data": {
            "domain": "www.example.com",
            "title": "walkerOS documentation",
            "referrer": "https://www.walkeros.io/",
            "search": "?foo=bar",
            "hash": "#hash",
            "id": "/docs/"
          },
          "context": {
            "dev": [
              "test",
              1
            ]
          },
          "globals": {
            "pagegroup": "docs"
          },
          "custom": {
            "completely": "random"
          },
          "user": {
            "id": "us3r",
            "device": "c00k13",
            "session": "s3ss10n"
          },
          "nested": [
            {
              "entity": "child",
              "data": {
                "is": "subordinated"
              }
            }
          ],
          "consent": {
            "functional": true
          },
          "id": "a5fb27180655d78a",
          "trigger": "load",
          "entity": "page",
          "action": "view",
          "timestamp": 1700000104,
          "timing": 3.14,
          "source": {
            "count": 1,
            "trace": "0a1b2c3d4e5f60718293a4b5c6d7e8f9",
            "type": "collector",
            "schema": "4"
          }
        },
        "settings": {
          "identify": {
            "map": {
              "uid": "user.id"
            }
          }
        },
        "out": [
          [
            "fullstory.setIdentity",
            {
              "uid": "us3r"
            }
          ],
          [
            "fullstory.trackEvent",
            {
              "name": "page view",
              "properties": {}
            }
          ]
        ]
      },
      "mappedEventName": {
        "title": "Renamed event",
        "description": "A mapping renames the event so the FullStory trackEvent uses Purchase instead of the walker name.",
        "in": {
          "name": "order complete",
          "data": {
            "id": "0rd3r1d",
            "currency": "EUR",
            "shipping": 5.22,
            "taxes": 73.76,
            "total": 555
          },
          "context": {
            "shopping": [
              "complete",
              0
            ]
          },
          "globals": {
            "pagegroup": "shop"
          },
          "custom": {
            "completely": "random"
          },
          "user": {
            "id": "us3r",
            "device": "c00k13",
            "session": "s3ss10n"
          },
          "nested": [
            {
              "entity": "product",
              "data": {
                "id": "ers",
                "name": "Everyday Ruck Snack",
                "color": "black",
                "size": "l",
                "price": 420
              },
              "context": {
                "shopping": [
                  "complete",
                  0
                ]
              },
              "nested": []
            },
            {
              "entity": "product",
              "data": {
                "id": "cc",
                "name": "Cool Cap",
                "size": "one size",
                "price": 42
              },
              "context": {
                "shopping": [
                  "complete",
                  0
                ]
              },
              "nested": []
            },
            {
              "entity": "gift",
              "data": {
                "name": "Surprise"
              },
              "context": {
                "shopping": [
                  "complete",
                  0
                ]
              },
              "nested": []
            }
          ],
          "consent": {
            "functional": true
          },
          "id": "cb48091a4595976a",
          "trigger": "load",
          "entity": "order",
          "action": "complete",
          "timestamp": 1700000102,
          "timing": 3.14,
          "source": {
            "count": 1,
            "trace": "0a1b2c3d4e5f60718293a4b5c6d7e8f9",
            "type": "collector",
            "schema": "4"
          }
        },
        "mapping": {
          "name": "Purchase"
        },
        "out": [
          [
            "fullstory.trackEvent",
            {
              "name": "Purchase",
              "properties": {}
            }
          ]
        ]
      },
      "setPageProperties": {
        "title": "Set page properties",
        "description": "A page view sets FullStory page-type properties without firing a track, since FullStory auto-captures navigation.",
        "in": {
          "name": "page view",
          "data": {
            "id": "/docs/",
            "title": "Getting Started"
          },
          "context": {
            "dev": [
              "test",
              1
            ]
          },
          "globals": {
            "pagegroup": "docs"
          },
          "custom": {
            "completely": "random"
          },
          "user": {
            "id": "us3r",
            "device": "c00k13",
            "session": "s3ss10n"
          },
          "nested": [
            {
              "entity": "child",
              "data": {
                "is": "subordinated"
              }
            }
          ],
          "consent": {
            "functional": true
          },
          "id": "38a5414b407c3503",
          "trigger": "load",
          "entity": "page",
          "action": "view",
          "timestamp": 1700000106,
          "timing": 3.14,
          "source": {
            "count": 1,
            "trace": "0a1b2c3d4e5f60718293a4b5c6d7e8f9",
            "type": "collector",
            "schema": "4"
          }
        },
        "mapping": {
          "silent": true,
          "settings": {
            "set": {
              "map": {
                "pageName": "data.title"
              }
            },
            "setType": "page"
          }
        },
        "out": [
          [
            "fullstory.setProperties",
            {
              "type": "page",
              "properties": {
                "pageName": "Getting Started"
              }
            }
          ]
        ]
      },
      "setUserProperties": {
        "title": "Set user properties",
        "description": "A purchase sets user-level FullStory properties such as revenue and currency alongside the tracked event.",
        "in": {
          "name": "order complete",
          "data": {
            "id": "0rd3r1d",
            "currency": "EUR",
            "shipping": 5.22,
            "taxes": 73.76,
            "total": 555
          },
          "context": {
            "shopping": [
              "complete",
              0
            ]
          },
          "globals": {
            "pagegroup": "shop"
          },
          "custom": {
            "completely": "random"
          },
          "user": {
            "id": "us3r",
            "device": "c00k13",
            "session": "s3ss10n"
          },
          "nested": [
            {
              "entity": "product",
              "data": {
                "id": "ers",
                "name": "Everyday Ruck Snack",
                "color": "black",
                "size": "l",
                "price": 420
              },
              "context": {
                "shopping": [
                  "complete",
                  0
                ]
              },
              "nested": []
            },
            {
              "entity": "product",
              "data": {
                "id": "cc",
                "name": "Cool Cap",
                "size": "one size",
                "price": 42
              },
              "context": {
                "shopping": [
                  "complete",
                  0
                ]
              },
              "nested": []
            },
            {
              "entity": "gift",
              "data": {
                "name": "Surprise"
              },
              "context": {
                "shopping": [
                  "complete",
                  0
                ]
              },
              "nested": []
            }
          ],
          "consent": {
            "functional": true
          },
          "id": "5456d1336e05ef14",
          "trigger": "load",
          "entity": "order",
          "action": "complete",
          "timestamp": 1700000105,
          "timing": 3.14,
          "source": {
            "count": 1,
            "trace": "0a1b2c3d4e5f60718293a4b5c6d7e8f9",
            "type": "collector",
            "schema": "4"
          }
        },
        "mapping": {
          "name": "Purchase",
          "settings": {
            "set": {
              "map": {
                "revenue": "data.total",
                "currency": "data.currency"
              }
            }
          }
        },
        "out": [
          [
            "fullstory.setProperties",
            {
              "type": "user",
              "properties": {
                "revenue": 555,
                "currency": "EUR"
              }
            }
          ],
          [
            "fullstory.trackEvent",
            {
              "name": "Purchase",
              "properties": {}
            }
          ]
        ]
      },
      "silentWithIdentify": {
        "public": false,
        "in": {
          "name": "user login",
          "data": {
            "id": "u-123",
            "name": "Jane Doe"
          },
          "context": {
            "dev": [
              "test",
              1
            ]
          },
          "globals": {
            "lang": "elb"
          },
          "custom": {
            "completely": "random"
          },
          "user": {
            "id": "us3r",
            "device": "c00k13",
            "session": "s3ss10n"
          },
          "nested": [
            {
              "entity": "child",
              "data": {
                "is": "subordinated"
              }
            }
          ],
          "consent": {
            "functional": true
          },
          "id": "7da8ea9d9ee67c9c",
          "trigger": "test",
          "entity": "user",
          "action": "login",
          "timestamp": 1700000108,
          "timing": 3.14,
          "source": {
            "count": 1,
            "trace": "0a1b2c3d4e5f60718293a4b5c6d7e8f9",
            "type": "collector",
            "schema": "4"
          }
        },
        "mapping": {
          "silent": true,
          "settings": {
            "identify": {
              "map": {
                "uid": "data.id",
                "properties": {
                  "map": {
                    "displayName": "data.name"
                  }
                }
              }
            }
          }
        },
        "out": [
          [
            "fullstory.setIdentity",
            {
              "uid": "u-123",
              "properties": {
                "displayName": "Jane Doe"
              }
            }
          ]
        ]
      },
      "userLoginIdentify": {
        "title": "User login identify",
        "description": "A user login fires FullStory setIdentity with uid and profile properties before tracking the event.",
        "in": {
          "name": "user login",
          "data": {
            "id": "u-123",
            "name": "Jane Doe",
            "email": "jane@example.com"
          },
          "context": {
            "dev": [
              "test",
              1
            ]
          },
          "globals": {
            "lang": "elb"
          },
          "custom": {
            "completely": "random"
          },
          "user": {
            "id": "us3r",
            "device": "c00k13",
            "session": "s3ss10n"
          },
          "nested": [
            {
              "entity": "child",
              "data": {
                "is": "subordinated"
              }
            }
          ],
          "consent": {
            "functional": true
          },
          "id": "0a20b238a0d56a17",
          "trigger": "test",
          "entity": "user",
          "action": "login",
          "timestamp": 1700000103,
          "timing": 3.14,
          "source": {
            "count": 1,
            "trace": "0a1b2c3d4e5f60718293a4b5c6d7e8f9",
            "type": "collector",
            "schema": "4"
          }
        },
        "mapping": {
          "settings": {
            "identify": {
              "map": {
                "uid": "data.id",
                "properties": {
                  "map": {
                    "displayName": "data.name",
                    "email": "data.email"
                  }
                }
              }
            }
          }
        },
        "out": [
          [
            "fullstory.setIdentity",
            {
              "uid": "u-123",
              "properties": {
                "displayName": "Jane Doe",
                "email": "jane@example.com"
              }
            }
          ],
          [
            "fullstory.trackEvent",
            {
              "name": "user login",
              "properties": {}
            }
          ]
        ]
      },
      "wildcardIgnored": {
        "public": false,
        "in": {
          "name": "debug noise",
          "data": {
            "string": "foo",
            "number": 1,
            "boolean": true,
            "array": [
              0,
              "text",
              false
            ]
          },
          "context": {
            "dev": [
              "test",
              1
            ]
          },
          "globals": {
            "lang": "elb"
          },
          "custom": {
            "completely": "random"
          },
          "user": {
            "id": "us3r",
            "device": "c00k13",
            "session": "s3ss10n"
          },
          "nested": [
            {
              "entity": "child",
              "data": {
                "is": "subordinated"
              }
            }
          ],
          "consent": {
            "functional": true
          },
          "id": "933f0be77e210aa8",
          "trigger": "test",
          "entity": "debug",
          "action": "noise",
          "timestamp": 1700000101,
          "timing": 3.14,
          "source": {
            "count": 1,
            "trace": "0a1b2c3d4e5f60718293a4b5c6d7e8f9",
            "type": "collector",
            "schema": "4"
          }
        },
        "mapping": {
          "ignore": true
        },
        "out": []
      }
    }
  }
}