Fluxyn Docs
NodesCoding

Set Variable

Creates or updates a global window variable.

Coding

Use this when a vendor expects a browser global like `dataLayer` or a queue object to exist first.

When to use it

  • Initialize a vendor queue before calling it.
  • Set a browser global once per page.

Routing behavior

Continues through its connected downstream path when it completes successfully.

Properties

PropertyTypeRequiredDetails
variableName
variableName
stringOptionalGlobal window variable name (e.g. dataLayer, fbq)
value
value
expressionOptionalValue to assign (supports expressions). If blank, defaults to empty array [].
preserveExisting
preserveExisting
booleanOptionalPreserve if already exists (acts like `window.var = window.var || value`)

Common mistakes

  • This is browser-only behavior.
  • Preserve Existing keeps the old value if one is already defined.

Related nodes