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

Dxtra Tag Manager Technical Guide

Detailed technical documentation for implementing and managing tags, rules, events, and actions within Dxtra Tag Manager.

Core Concepts

Dxtra Tag Manager is built on an event-driven, rule-based engine where:

  • Events trigger evaluation
  • Conditions and Exceptions determine if rules should fire
  • Actions execute when rules are satisfied

Events

Event Types

Platform Events (pre-defined):

  • Page View -- Fires on page load
  • Click Elements -- Tracks element clicks
  • Form Submit -- Monitors form submissions
  • Scroll Depth -- Tracks scroll percentage
  • Time on Page -- Fires after specified duration

Custom Browser Events:

JavaScript
window.dispatchEvent(new CustomEvent('myCustomEvent', {
    detail: { category: 'engagement', action: 'video-play' }
}));

CSS Selectors for Events

Events support CSS query selectors for element binding:

  • ID selector: #example-id
  • Class selector: .example-class
  • Attribute selector: [data-tracking="button-click"]

Event State Management

  • Single Fire -- Events fire once per page by default
  • Reset State -- Enable to reset event after specified milliseconds
  • Persistent State -- Maintains state across page navigation in SPAs

Rules

Rule Structure

Text Only
IF (Events AND Conditions) AND NOT (Exceptions)
THEN Execute Actions

Rule Properties

  • Execution Order -- Rules evaluate serially within Rule Groups. First matching rule wins unless repeatable.
  • Repeatable Rules -- Enable rules to fire multiple times with configurable delay between executions.

Conditions (Must Match)

Test data layer values and page state:

JavaScript
// Check page path
window.location.pathname.includes('/checkout')

Exceptions (Must NOT Match)

Prevent tag firing under specific circumstances:

JavaScript
// Don't fire on admin pages
!window.location.pathname.startsWith('/admin')

Comparison Operators

  • Equals -- Exact match
  • Contains -- Substring match
  • Matches RegEx -- Pattern matching
  • Greater Than / Less Than -- Numeric comparisons
  • Exists / Not Exists -- Presence checks

Rule Groups

Rule Groups provide:

  • Parallel evaluation of multiple rules
  • Logical organization of related rules
  • Performance optimization through grouping

Actions

Action Types

  1. Set Data Layer Variable

    JavaScript
    dataLayer.push({
        event: 'purchase',
        value: 99.99,
        currency: 'USD'
    });
    
  2. Send HTTP Request -- POST data to external endpoints

  3. Execute Custom JavaScript -- Run custom tracking logic
  4. Load External Script -- Dynamically load third-party scripts

Action Groups

Action Groups contain related actions that can be reused across multiple rules and support A/B testing through distributions.

Distributions (A/B Testing)

Distribution Types

  1. None -- All actions execute (100%)
  2. Page Load -- Random selection per page view
  3. Session -- Consistent selection per user session

Session-based distribution uses privacy-preserving identification (24-hour hash, no cookies, no personal information stored). Distribution values range from 1-1000.

Global Triggers and Actions

Global Triggers -- Reusable trigger combinations across multiple rules for standardizing common patterns.

Global Actions -- Shared actions for consistency across rules (error tracking, performance monitoring, consent updates, session management).

Single Page Applications

Handle client-side routing in SPAs:

JavaScript
window.addEventListener('popstate', () => {
    // Re-evaluate tags on route change
});

Debugging

Debug Mode

JavaScript
// Enable debug mode
window.dxtraDebug = true;

// Enable verbose logging
window.dxtraVerbose = true;

Debug mode provides:

  • Event monitoring as events fire
  • Rule evaluation tracking
  • Data layer inspection
  • Action execution monitoring
  • Performance metrics

Best Practices

Performance

  1. Minimize DOM queries -- cache element references
  2. Debounce scroll events
  3. Lazy load tags when possible
  4. Use rule priorities for efficient ordering

Privacy Compliance

  1. Check consent before firing tags
  2. Collect only necessary data
  3. Use privacy-preserving identifiers
  4. Implement data retention policies

Organization

  1. Use consistent, descriptive naming conventions
  2. Document complex rules and actions
  3. Use revisions for change management
  4. Test in preview mode before publishing

Error Handling

  1. Wrap custom JavaScript in try-catch blocks
  2. Implement fallback actions for failed requests
  3. Monitor and log failures
  4. Ensure graceful degradation

Troubleshooting

Tags Not Firing

  • Check event bindings and CSS selectors
  • Verify conditions are met
  • Review consent state
  • Inspect browser console for errors

Duplicate Tracking

  • Check rule repeatability settings
  • Review action group distributions
  • Verify SPA route change handling

Performance Issues

  • Optimize selector queries
  • Reduce synchronous actions
  • Review tag loading priorities

For support, contact support@dxtra.ai with "Tag Manager" in the subject line.