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

Analytics Integration

Dxtra Tag Manager can work alongside third-party analytics platforms. Use the rule engine to control when and how data is sent to external services while respecting visitor consent.

Approach

Dxtra's built-in analytics runs automatically and requires no additional configuration. Third-party analytics platforms (Google Analytics, Facebook Pixel, etc.) are integrated through Tag Manager rules and actions:

  1. Create a rule that fires on the desired event (e.g., Page View)
  2. Add a consent condition to check the visitor has granted analytics or marketing consent
  3. Add an action that loads the third-party script and sends data

This pattern ensures third-party tracking only runs when the visitor has provided appropriate consent.

Common Integrations

Google Analytics 4

To send page views and events to GA4:

  1. Create a rule with the Page View event
  2. Add a condition: CMP.analytics equals true
  3. Add a Load JS action to load the GA4 script (https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX)
  4. Add a Load JS Direct action to initialize GA4:
JavaScript
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');

For custom events, create additional rules that fire Inject Script actions with gtag('event', ...) calls.

Facebook Pixel

  1. Create a rule with the Page View event
  2. Add a condition: CMP.marketing equals true
  3. Add a Load JS action to load the Facebook SDK
  4. Add a Load JS Direct action to initialize:
JavaScript
fbq('init', 'YOUR_PIXEL_ID');
fbq('track', 'PageView');

Other Platforms

The same pattern works for any analytics or marketing platform:

  • Load the platform's script using Load JS
  • Initialize and configure using Inject Script or Load JS Direct
  • Gate execution behind the appropriate consent condition

Always check consent before sending data to third-party platforms:

Consent Category Platforms Legal Basis
analytics Google Analytics, Adobe Analytics, Mixpanel Consent or legitimate interest
marketing Facebook Pixel, Google Ads, LinkedIn Insight Consent required
functional Chat widgets, personalization tools Consent or legitimate interest

Use rule conditions to check CMP.analytics, CMP.marketing, or CMP.functional before firing third-party tags.

Dxtra's built-in analytics does not require consent conditions -- it is privacy-compliant by design.

Dual Tracking

You can track events in both Dxtra analytics and a third-party platform simultaneously. Use a rule with two actions:

  1. A Track Event action for Dxtra analytics (fires without consent gate)
  2. An Inject Script action for the third-party platform (gated by consent condition)

This ensures you always have privacy-compliant analytics data in Dxtra, with richer third-party data available when consent is granted.

Best Practices

  • Always gate third-party scripts behind consent conditions to comply with GDPR/CCPA
  • Use Dxtra analytics as your baseline -- it works without consent and provides core metrics
  • Load third-party scripts asynchronously to avoid blocking page rendering
  • Test integrations in a development environment before publishing to production
  • Monitor the debug overlay to verify scripts load and events fire correctly

Continue to Consent Integration for detailed consent management integration.