Fluxyn Docs
Core concepts

Variables and Expressions

Learn which values are available during a run and how to reference them safely inside Fluxyn.

Expressions are how you move data through a flow.

They let you read values from the current event, from page state, or from earlier nodes without dropping into custom code for every simple mapping.

Primary Tokens

There are four variables you will use most often.

$ (Page State)

$ is the current page-level state.

Use it when you want values that should outlive a single event, such as:

  • stored UTM parameters
  • a user tier captured earlier in the session
  • consent state that later flows should reuse

$eventData (Current Event)

$eventData is the event that started this execution.

Use it when the value belongs to the current trigger, for example:

  • the clicked element details
  • the payload from dataLayer.push({ event: ... })
  • route information from a history change

$input (Previous Node Output)

$input is the output of the previous node on the current path.

Use it when you are chaining logic from one node to the next, such as:

  • sending a transformed payload into an HTTP node
  • checking the result of a custom function
  • reusing data produced by a filter or branch

$outputs is an equivalent alias.

$consent is the current consent snapshot.

Use it when a flow must behave differently based on privacy state, such as gating analytics or advertising tags.

Secondary Helpers

Fluxyn also exposes a few useful helpers:

  • $('Node Name') reads the output of a named node elsewhere in the same execution
  • $window exposes selected browser values such as location.href
  • $id gives you the current execution id
  • $now gives you a Date
  • $timestamp gives you Date.now()

Writing Expressions

Most expressions are simple value lookups or string interpolation.

Examples:

  • {{ $.user.email }}
  • {{ $eventData.value }}
  • https://example.com/collect?id={{ $.orderId }}

Keep in mind:

  • expressions are for mapping values, not for writing large programs
  • if the logic becomes hard to read, move it into a Transform, If, or Custom Function node
  • use page state intentionally so you do not accidentally mix long-lived values with current event data

Practical Rule of Thumb

If you are only reading, reshaping, or interpolating values, expressions are usually enough.

If you need real procedural logic, a custom function is probably the better tool.

On this page