Plain HTML
Put the tag in the <head> of every page. If your site has a shared header include, put it there once.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>My site</title>
<script defer src="https://lynq.byharsh.com/js/lynq.js" data-site="your-site.com" data-vitals></script>
</head>
<body>
…
</body>
</html>defer means the script never blocks rendering; it runs once the document has parsed and records the pageview then. It is 2.1 kB compressed.
Static site generators (Hugo, Jekyll, Eleventy, Gatsby) all have a base layout or a head partial; the tag goes there. Nothing else is needed for pages that load normally. If your pages change without a full load, see single-page apps.