DataLook Docs
Install guides

SolidStart

Install DataLook on SolidStart — the plain script tag, or the first-party proxy that beats ad blockers. Both on one page.

Add the tag to the document head in app.tsx / entry-server.

Add the script to your <head>

src/entry-server.tsx
<script defer src="https://cdn.datalook.app/s.js" data-site="YOUR_SITE_ID"></script>

The proxy install serves both s.js and the collector from your own domain, so ad blockers — which match on domain, not path — can't see us. You rewrite one innocuous path prefix to our CDN; the script figures out the rest.

A catch-all API route forwards the prefix.

Add a proxy API route

src/routes/_axis/[...path].ts
import type { APIEvent } from '@solidjs/start/server'const TARGET = 'https://cdn.datalook.app'async function proxy({ params, request }: APIEvent) {  const path = Array.isArray(params.path) ? params.path.join('/') : params.path  return fetch(`${TARGET}/${path}`, {    method: request.method,    headers: request.headers,    body: request.method === 'GET' ? undefined : await request.arrayBuffer(),    // @ts-expect-error duplex is required for streamed request bodies on Node    duplex: 'half',  })}export const GET = proxyexport const POST = proxy

Point the script at the prefix

<script defer src="/_axis/s.js" data-site="YOUR_SITE_ID"></script>

Heads up

Your server now sits between the visitor and us, so forward the visitor IP (X-Forwarded-For) or your country breakdown will collapse to your server location. The DNS proxy avoids this entirely — see the proxy overview.