Skip to content
Last updated: 2026-04-06
Reference

Actions

Actions define what happens when a rule matches. They are the executable component of Dxtra Tag Manager's rule engine.

How Actions Work

When a rule's event fires and its conditions pass, the rule's actions execute sequentially within their action group. Each action performs a specific task -- firing a pixel, loading a script, tracking an event, or injecting content.

Text Only
Rule Matches → Action Group Selected → Actions Execute (in order)

Actions run serially within a group. Earlier actions can set up data that later actions depend on.

Built-in Action Types

Dxtra Tag Manager provides 11 built-in action types:

Action Type Description Common Use
Track Event Send an event to Dxtra analytics Page views, custom events, conversions
Action Log Log a message to the browser console Debugging and development testing
Set App State Variable Store a value in application state Share data between rules
Increment App State Variable Increment a numeric state value Counters, page view sequences
Inject Script Inject JavaScript code into the page Custom tracking, third-party pixels
Create Hidden Frame Create an invisible iframe Cross-domain tracking, conversion pixels
Fire Pixel Send a tracking pixel HTTP request Marketing pixels, impression tracking
Load JS Load an external JavaScript file by URL Third-party libraries (GA4, Facebook SDK)
Load JS Direct Execute JavaScript code directly Inline script execution
Load HTML Inject HTML content into the page Widgets, banners, placement content
Data Manager Interact with the data layer Read/write data layer values

Configuring Actions

Actions are created within rule configurations in the Tag Manager dashboard.

Creating an Action

  1. Open a rule in the Tag Manager dashboard
  2. In the Actions section, click Add Action
  3. Select the action type from the dropdown
  4. Configure the action parameters
  5. Set the execution order within the action group

Action Parameters

Each action type has its own configuration fields. Common parameters include:

Parameter Description
Name Descriptive label for the action
Type The action type (from the table above)
Order Execution sequence within the action group

Track Event

Sends an event to Dxtra's built-in analytics (ClickHouse backend):

Field Description
Event Name Name of the event to track
Event Properties Key-value pairs of event data

Inject Script / Load JS Direct

Executes custom JavaScript code. Use this for custom logic or third-party integrations:

Field Description
Script Content JavaScript code to execute

Third-Party Integrations

Use Load JS to load external scripts (like Google Analytics or Facebook Pixel) and Inject Script or Load JS Direct for the initialization and configuration code.

Fire Pixel

Sends an HTTP request to a tracking pixel URL:

Field Description
Pixel URL The URL to send the tracking request to

Load HTML

Injects HTML content into the page, useful for embedding widgets or banners:

Field Description
HTML Content The HTML markup to inject
Placement Where to inject the content

Set / Increment App State Variable

Manages application state that persists across rule evaluations:

Field Description
Variable Name The state variable key
Value The value to set (or increment amount)

Using Variables in Actions

Actions can reference dynamic values using the {{variable}} syntax:

Text Only
{{Page URL}}           - Current page URL
{{Page Title}}         - Current page title
{{Referrer}}           - Referring URL
{{Environment.NAME}}   - Environment variable
{{CMP.analytics}}      - Consent status

Variables are resolved at execution time, so they reflect the current state when the action runs.

Action Execution Order

Actions within a group execute in the order defined by their position. This matters when:

  • An earlier action sets a state variable that a later action reads
  • You need scripts loaded before configuration code runs
  • A consent check must happen before firing tracking pixels

Error Handling

If an action fails (e.g., a script throws an error or a pixel URL is unreachable), the Tag Manager logs the error. Other actions in the group continue executing unless the failure is critical.

Use the debug overlay (#dxtra-debug) to monitor action execution and identify failures in real time.

Best Practices

  • Name actions clearly so their purpose is obvious in the dashboard
  • Order actions logically -- load scripts before running code that depends on them
  • Use Track Event for Dxtra analytics rather than custom JavaScript
  • Check consent in rule conditions before firing third-party tracking actions
  • Test in development using the debug overlay before publishing to production
  • Keep custom scripts minimal -- complex logic is harder to debug and maintain

Continue to Action Groups to learn how actions are organized and executed together.