ActionLab Analytics for Eleventy (11ty)

Add privacy-first, AI-powered analytics to your Eleventy (11ty) site in under 60 seconds. No cookies, no consent banners, no complex setup.

Setup at a Glance

Add ActionLab to Eleventy (11ty) in 4 simple steps. Copy one script tag, paste it into your project, and start collecting privacy-friendly analytics immediately.

Category: Framework|4 setup steps|No cookies required

About Eleventy (11ty)

Eleventy is a simpler, more flexible static site generator that prioritizes independence from any specific JavaScript framework. It supports multiple template languages, requires zero client-side JavaScript by default, and produces clean, fast websites. ActionLab integration is as simple as adding a script tag to your base layout template, maintaining Eleventy zero-config philosophy.

Why Add Analytics to Eleventy (11ty)

Eleventy users value simplicity and the ability to ship fast, clean websites without framework overhead. ActionLab aligns with these values: one script tag, under 2KB, no framework dependencies, and no configuration beyond the site ID. For Eleventy personal blogs, documentation sites, and portfolios, the AI insights provide content performance analysis that helps creators understand their audience without the complexity of enterprise analytics tools.

Installation Code

Eleventy (11ty)
<!-- Add to your base layout template -->
<script
  src="https://cdn.actionlabanalytics.com/actionlab.js"
  data-site="YOUR_SITE_ID"
  defer
></script>

Step-by-Step Setup

  1. 1

    Open your base layout template — typically _includes/base.njk, _includes/base.liquid, or _includes/layout.njk depending on your template language.

  2. 2

    Add the ActionLab script tag in the <head> section of the base layout.

  3. 3

    Replace YOUR_SITE_ID with your actual site ID from the ActionLab dashboard.

  4. 4

    Build and deploy your Eleventy site. The script is included in every page that extends the base layout.

Why Use ActionLab with Eleventy (11ty)

  • Works with all Eleventy template engines — Nunjucks, Liquid, Handlebars, JavaScript, and others.
  • Static site compatible with zero server-side requirements.
  • Minimal footprint matches Eleventy philosophy of simplicity and zero unnecessary JavaScript.
  • No Eleventy plugin needed — a script tag in the base layout is the complete integration.

Frequently Asked Questions

Is there an Eleventy plugin for ActionLab?

No plugin is needed. A simple script tag in your base layout template is the complete integration. This approach works with all Eleventy versions, all template engines, and all hosting platforms. No build-time processing is needed because ActionLab is loaded at runtime from the CDN.

Does ActionLab work with Eleventy serverless?

Yes. Eleventy Serverless generates pages on-demand, and ActionLab client-side script works identically on dynamically generated and statically generated pages.

Can I use Eleventy data files for the site ID?

Yes. Store the ActionLab site ID in your Eleventy data cascade (e.g., _data/analytics.json) and reference it in your template with {{ analytics.siteId }}. This keeps the configuration centralized and environment-aware.

Does ActionLab work with Eleventy Image?

ActionLab does not interact with Eleventy Image or any other Eleventy plugin. They operate in completely separate domains — Eleventy Image processes images at build time, while ActionLab loads at runtime in the browser.

Does ActionLab affect Eleventy build speed?

No. ActionLab is a runtime script loaded from an external CDN. It is not processed during the Eleventy build and has no impact on build speed. The script tag is simply included in the generated HTML output.