SSR apps
Server-rendered pages work exactly like static sites from the tracker’s point of view: the snippet is inert until the browser parses and executes it, so it doesn’t matter whether the surrounding HTML came from a template on disk or was rendered per-request on the server.
Include the snippet in whatever shared layout or partial renders your <head> (or the end of <body>):
<script src="https://cdn.analytics.canarycoders.es/lytics.js" data-domain="myapp.com" defer></script>That is the whole integration for classic server-rendered apps. There is no client-side router to patch and no hydration timing to worry about.
If your SSR framework layers a client-side router on top of the initial server render (Next.js, Remix, SvelteKit, Nuxt, and similar “SSR + SPA navigation” frameworks), the snippet’s history.pushState/replaceState patching picks up client-side route changes automatically once the app hydrates.