Behavior System
The Behavior System extends J2 Tag Manager with programmable automation. It allows the structured tagging workflow to react to defined events and execute logic based on rules, operators, and actions.
This system is part of J2 Tag Manager Professional and is intended for advanced workflows where tags should not only organize content, but also drive automated behavior in the editor or at runtime.
What the Behavior System Is
At its core, the Behavior System is a configurable automation layer built on top of the structured tag workflow. It uses Behavior Assets to define what should happen when a specific event occurs.
A Behavior Asset does not run on its own. It is referenced from the structured tagging system and becomes part of the behavior flow when the configured event is triggered. Once that happens, the system evaluates the defined logic and may execute one or more actions.
This makes the system suitable for validation, automation, editor workflows, and more advanced tag-driven logic.
Behavior Assets
The central element of the system is the Behavior Asset.
A Behavior Asset contains the configuration that defines how the automation behaves. This includes:
a Description
a Priority
whether the asset is Enabled
the selected Event
the allowed execution context
Rules
Operators
Actions
Together, these parts define when the behavior is allowed to run and what it should do once triggered.
Where Behavior Assets Can Be Used
Behavior Assets work with the structured TagSet-based workflow. They are not intended for Quick Tags or Undefined Tags.
A Behavior Asset can be referenced on:
a TagSet
a Group
an individual TagSet Tag
This makes it possible to define automation at different levels of the hierarchy. A behavior can be attached directly to a single managed tag, or it can be assigned at a broader level such as a group or entire TagSet.
In practice, these references are configured through the Tag Manager panel.
Reuse and Scope Rules
Behavior Assets are reusable. The same asset can be referenced from multiple TagSets, groups, or tags.
It is also possible to assign multiple Behavior Assets to the same TagSet, group, or tag. This allows more complex automation to be composed from several smaller behavior units.
However, the same Behavior Asset cannot be referenced multiple times on the same exact scope.
Behavior Inheritance
Behavior can also be inherited through the hierarchy.
This means that behavior defined on a TagSet or group can participate in the behavior flow of lower levels, depending on how the hierarchy is structured. This allows higher-level behavior to apply consistently without requiring the same setup to be repeated on every single tag.
Inheritance is especially useful when a broader set of tags should share the same automation logic.
Events and the J2 Behavior Subsystem
Behavior execution is driven by events. These events are processed by the J2 Behavior Subsystem, which acts as the entry point for the behavior flow.
When a configured event occurs, the subsystem evaluates the relevant Behavior Assets and begins the execution process. The asset then checks its context, evaluates its rules, processes them through operators, and may finally execute actions.
This means that the event logic is not handled directly by the tag itself. Instead, the tag, group, or TagSet references the Behavior Asset, while the actual event flow is coordinated by the subsystem.
For more information about available triggers, see Events.
Core Execution Flow
The overall execution flow of the system is:
A configured event occurs
The J2 Behavior Subsystem forwards the event into the Behavior System
The Behavior Asset checks whether it is allowed to run in the current context
Its rules are evaluated
operators process the rule results
actions are triggered
This separation is important because it keeps condition evaluation and execution logic distinct.
Execution Context
Each Behavior Asset defines when it is allowed to run.
It can be configured to execute:
only in the Editor
only at Runtime
or in Both
This allows the same overall system to support editor-side automation as well as runtime behavior, depending on the asset configuration.
Rule Input Variables
Some Behavior Assets expose configurable rule input values.
When supported by the asset, these values can be adjusted directly from the Tag Manager panel for the specific reference. This makes it possible to reuse the same Behavior Asset in multiple places while still customizing how it behaves in each case.
This is especially useful when the same underlying automation should be shared across several TagSets, groups, or tags, but with different input values.
Built-in and Custom Functionality
The Behavior System supports both predefined and extensible functionality.
It can use built-in functions provided by the system, but it can also be extended with custom functionality where needed. This makes the system flexible enough for both standard workflows and more project-specific behavior setups.
The exact details depend on the configured rules, operators, and actions and are explained in the related topics.
Related Topics
The Behavior System is split into multiple topics:
These pages explain the system in more detail, from available triggers to decision logic and execution.