Go (stdlib / Gin / Echo)
Install DataLook on Go (stdlib / Gin / Echo) — the plain script tag, or the first-party proxy that beats ad blockers. Both on one page.
Paste one tag into the <head> of the HTML your app renders. No build step, no package.
Add the script to your <head>
Drop it in as the first script in <head>, before any analytics-blocking library.
<script defer src="https://cdn.datalook.app/s.js" data-site="YOUR_SITE_ID"></script>Deploy and visit your site
Open your site in a fresh tab. Your first pageview shows up in the dashboard within a few seconds.
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.
The stdlib reverse proxy forwards the prefix.
Mount a reverse proxy
package mainimport ( "net/http" "net/http/httputil" "net/url" "strings")func main() { target, _ := url.Parse("https://cdn.datalook.app") proxy := httputil.NewSingleHostReverseProxy(target) director := proxy.Director proxy.Director = func(r *http.Request) { director(r) r.URL.Path = strings.TrimPrefix(r.URL.Path, "/_axis") r.Host = target.Host } http.Handle("/_axis/", proxy) http.ListenAndServe(":8080", nil)}Point the script at the prefix
<script defer src="/_axis/s.js" data-site="YOUR_SITE_ID"></script>Heads up