Skip to main content
The Container lets you manage all your tracking pixels and tags (Meta, Google, TikTok, custom scripts) from your DATALYR dashboard without code changes. It’s built into the dl.js tracking tag — there is no separate container script to install.
If you’ve already installed DATALYR — the dl.js snippet from Settings → Install, or any of the platform guides — the Container is already running. Skip to Manage your tags. Do not add a separate container.js tag: dl.js already runs the Container, and loading both double-fetches your config and double-fires your pixels.

The one tag

<script
  defer
  src="https://track.datalyr.com/dl.js"
  data-workspace-id="YOUR_WORKSPACE_ID">
</script>
This single tag does event tracking + attribution and runs the Container — on load it fetches your configured scripts and pixels from /container-scripts and fires them. Get your workspace ID from Settings → Install.

Add it to your site

Option 1: Direct HTML

Add the script to your <head>:
<head>
  <!-- DATALYR -->
  <script
    defer
    src="https://track.datalyr.com/dl.js"
    data-workspace-id="YOUR_WORKSPACE_ID">
  </script>
</head>

Option 2: Google Tag Manager

  1. Tags → New → Custom HTML
  2. Paste the dl.js snippet above
  3. Trigger: All Pages, then Save and publish

Option 3: Next.js

import Script from 'next/script'

// App Router (app/layout.tsx) — inside <head>, or Pages Router (_app.tsx)
<Script
  src="https://track.datalyr.com/dl.js"
  data-workspace-id={process.env.NEXT_PUBLIC_DATALYR_WORKSPACE_ID}
  strategy="afterInteractive"
/>

Option 4: Webflow

Project Settings → Custom Code → Head Code, paste the dl.js snippet, Save and publish.

Option 5: WordPress

Paste the dl.js snippet before </head> in Appearance → Theme File Editor → header.php, or use a plugin like Insert Headers and Footers.

Option 6: Shopify

Install the DATALYR Shopify app and enable the theme app embed (Theme Customizer → App embeds → Datalyr Analytics). The embed injects dl.js for you — don’t paste a tag manually. See the Shopify guide.

Verify installation

  1. Open your site, then DevTools → Network
  2. Filter by datalyr — you should see one request to https://ingest.datalyr.com/container-scripts
  3. Its response returns your configured scripts, pixels, and SDK config
You should see exactly one /container-scripts request. If you see two, you’ve loaded both dl.js and a legacy container.js tag — remove the container.js one.

Manage your tags

With dl.js installed, configure tags from the dashboard — they load automatically, no code changes:
  1. Dashboard → Settings → Pixels & scripts
  2. Add a Meta Pixel, Google Tag, TikTok Pixel, or custom (inline / external) script
  3. Set triggers (page_load, dom_ready, window_load) and conditions (URL, referrer, device)
  4. Save and activate — tags fire on the next page load
See Managing Tags for the full configuration reference.

Single-page apps (React, Vue, Next.js)

The Container auto-detects client-side navigation (history.pushState/replaceState, popstate). No extra configuration — tags with navigation triggers fire on route changes.

Content Security Policy

If you run a CSP, allow the DATALYR origins:
Content-Security-Policy:
  script-src 'self' https://track.datalyr.com;
  connect-src 'self' https://ingest.datalyr.com;

Troubleshooting

Tag not loading? Confirm the dl.js URL and data-workspace-id are correct, the script is in <head>, and ad blockers are off. Scripts not firing? Check the tag is active in the dashboard and its triggers/conditions match the page. Confirm the /container-scripts response includes the tag. Seeing pixels fire twice? You’re loading both dl.js and a legacy container.js — remove container.js. dl.js runs the Container on its own. 404s on /container-scripts? Verify your workspace ID.

Next steps

Managing Tags

Create and configure your tags

Container Overview

How the Container works

Identity Bridge

Dashboard-controlled identity + attribution, same tag

Verify Tracking

Confirm everything works