Install guides
Pick your stack. Each guide has the plain script-tag install and the ad-blocker-proof proxy install on one page.
Every guide below puts both install methods on a single page, behind two tabs:
- Standard install — paste one tag, served from our CDN. Up in two minutes.
- Behind a proxy — serve our script from your own domain so ad blockers can't strip it. Recovers the 15–40% of privacy-minded visitors that vanish otherwise.
Start with the standard install. Add the proxy later, on the same page, when you want that traffic back. You don't lose your place.
The one tag
Whatever your stack, the standard install is this — with your own data-site:
<script defer src="https://cdn.datalook.app/s.js" data-site="YOUR_SITE_ID"></script>Why only one data attribute?
Some analytics scripts need two — a website id and a data-domain — plus a loader strategy. Ours needs one. Here's the difference:
data-site— your site id. Required. It's the only thing the script can't figure out on its own.- No
data-domain. Tools that ship one sharedscript.jsto every customer can't tell which site they're on, so you have to tell them the domain. Our script is keyed bydata-siteand reports for whatever origin it's loaded on, so there's nothing to declare. - No
src/strategy"arguments". Those aren't ours —srcis the standard HTML attribute every script tag has, andstrategy="afterInteractive"is a Next.js<Script>prop for when to load it. Neither is analytics config.
So the honest comparison is one attribute (data-site) vs. two (website-id + domain). Fewer moving parts, less to get wrong.
There's an optional second attribute, data-api, for unusual proxy layouts — see the proxy overview. You won't need it for any of the guides below.
Pick your framework
Meta-frameworks
▲ Next.js
next/script + next.config rewrites
🟢 Nuxt 3 (Vue)
app.head + Nitro routeRules
💿 Remix / React Router
root.tsx tag or a resource route
🔥 SvelteKit
svelte:head + hooks.server.ts
🚀 Astro
is:inline tag or SSR middleware
⚡ Qwik City
head script + route handler
🧬 SolidStart
head tag + API route
🅰️ Angular Universal
index.html tag + server.ts proxy
Backend frameworks
💎 Ruby on Rails
routes.rb + Net::HTTP controller
🐍 Django
urls.py + httpx pass-through view
🧪 Flask
Blueprint + requests
⚙️ FastAPI
APIRouter + httpx
🟩 Express
http-proxy-middleware
🐈 NestJS
http-proxy-middleware in main.ts
🅻 Laravel (PHP)
routes/web.php + Http::
🎼 Symfony (PHP)
Controller + HttpClient
🔷 ASP.NET Core
YARP MapForwarder
☕ Spring Boot
Spring Cloud Gateway route
🐹 Go (stdlib / Gin / Echo)
httputil.ReverseProxy
🟣 Phoenix (Elixir)
forward to ReverseProxyPlug
Not listed?
The standard install is a plain <script> tag — drop it in your <head> and you're done, no matter the stack. For the proxy install, any reverse proxy works: forward one path prefix (we use /_axis/) to https://cdn.datalook.app and point the script at it. The nginx and Caddy guides are the generic templates.