> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datalyr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Container Installation

> The DATALYR Container is built into the dl.js tracking tag — manage every pixel and tag from your dashboard, with no separate script

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.

<Note>
  If you've already installed DATALYR — the `dl.js` snippet from **Settings → Install**, or any of the [platform guides](/getting-started/installation/overview) — the Container is **already running**. Skip to [Manage your tags](#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.
</Note>

## The one tag

```html theme={null}
<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>`:

```html theme={null}
<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

```typescript theme={null}
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](/getting-started/installation/platforms/shopify-app-store).

## 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](/container/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

<CardGroup cols={2}>
  <Card title="Managing Tags" icon="tags" href="/container/managing-tags">
    Create and configure your tags
  </Card>

  <Card title="Container Overview" icon="info" href="/container/overview">
    How the Container works
  </Card>

  <Card title="Identity Bridge" icon="bolt" href="/features/identity-bridge">
    Dashboard-controlled identity + attribution, same tag
  </Card>

  <Card title="Verify Tracking" icon="check" href="/getting-started/installation/verify-tracking">
    Confirm everything works
  </Card>
</CardGroup>
