Skip to main content
There is one DATALYR tag: dl.js. The “Container” is a built-in mode of that tag, not a separate script. So this isn’t a choice between two tags — it’s a choice of mode:
  • Container mode (default): let dl.js load and manage your pixels/tags from the dashboard.
  • Tracking-only mode: use dl.js for attribution + events, and hardcode your own ad pixels yourself (set enableContainer: false).
There is no standalone container.js to install, and you should never load two DATALYR tags — dl.js already runs the Container. Loading a separate container.js alongside it double-fetches your config and double-fires your pixels.

Quick comparison

Container mode (default)Tracking-only mode
Tagdl.jsdl.js (same tag)
Howconfigure pixels in the dashboardenableContainer: false, hardcode pixels
Pixel changesinstant, from the dashboardcode change + deploy
Conditional loadingbuilt-in (URL / referrer / device)you code it
Managed bymarketers, no codedevelopers
Best formost sites, multiple ad platformsfull manual control / specific setups
Attribution + events✅ (identical — same tag)
Attribution, UTM/click-ID capture, session tracking, and the Identity Bridge work the same in both modes — they’re part of dl.js. The only difference is whether dl.js also loads your dashboard-configured pixels. dl.js fetches /container-scripts on load and fires the Meta/Google/TikTok pixels and custom scripts you’ve configured, with their triggers and conditions. Use it when you want to:
  • Manage multiple ad pixels without editing code
  • Update pixel IDs / events instantly from the dashboard
  • Let marketers add tags without a developer
  • Conditionally load scripts by URL, referrer, or device
  • Disable a tag instantly if something breaks
<head>
  <script
    defer
    src="https://track.datalyr.com/dl.js"
    data-workspace-id="YOUR_WORKSPACE_ID">
  </script>
</head>
Then add tags in Settings → Pixels & scripts. No further code changes.

Tracking-only mode

If you’d rather hardcode your own ad pixels (e.g. you want them server-rendered, or you manage them in your own code), disable the Container so dl.js doesn’t also load dashboard tags — you still get full attribution + event tracking:
// npm SDK
datalyr.init({ workspaceId: 'YOUR_WORKSPACE_ID', enableContainer: false });
<!-- ...then add your own pixels by hand, e.g. Meta -->
<script>
  !function(f,b,e,v,n,t,s){/* fbevents */}(window,document,'script',
  'https://connect.facebook.net/en_US/fbevents.js');
  fbq('init', 'YOUR_PIXEL_ID');
  fbq('track', 'PageView');
</script>
If you’re firing your own Meta Pixel and sending server-side CAPI, pass a shared eventID to fbq('track', …, { eventID }) that matches the server event’s event_id so Meta dedupes them. (Container mode does this for you.)

Switching modes

  • Tracking-only → Container: remove your hardcoded pixels, recreate them as tags in Settings → Pixels & scripts, and stop setting enableContainer: false (it defaults on). One tag, no second script.
  • Container → tracking-only: set enableContainer: false, then hardcode the pixels you need.

Mobile apps

Neither mode applies to mobile — use the native SDKs (@datalyr/swift, @datalyr/react-native), which identify users via explicit identify() calls.

Next steps

Container Installation

Install dl.js (the Container is built in)

Managing Tags

Configure your pixels and scripts

Container Overview

How the Container works

Web SDK

init() options including enableContainer