Direct pixel install
Five minutes. Works on any HTML page — plain static, Next.js, Astro, Vue, Svelte, Rails, Django, you name it. Use this if there's no framework package for your stack yet (or if you just prefer the one-line approach).
Install
Get your site key from
Studio → Settings → Install
(it looks like d1db1759f22827e4).
Drop this in your master layout, above </head>:
<script async src="https://harvv.com/px/YOUR_SITE_KEY/pixel.js"></script>
That's the entire install. The pixel will start capturing on the next page load.
Verify
Load any page on your site, then in your browser's dev-tools Network tab look for:
pixel.js— should load with HTTP 200/px/YOUR_KEYPOST requests as you click around
Then check your dashboard at /site.html#/app; the first event should appear in 30 seconds or less.
Content-Security-Policy
If your site sends a CSP header, add the Harvv hosts to its directives:
script-src 'self' https://harvv.com;
connect-src 'self' https://harvv.com;
img-src 'self' https://harvv.com data:;
Bundle size + perf
- 15.6 KB gzip, served from a CDN edge close to your visitors
- Loads async — never blocks page render
- Zero PII captured by default (no email, phone, password, credit card)
- Respects Do Not Track when configured
Framework-specific snippets
Next.js (app router)
In app/layout.tsx:
<script async src="https://harvv.com/px/YOUR_KEY/pixel.js" />
Vite + Vue / React / Svelte
In index.html, above </head>:
<script async src="https://harvv.com/px/YOUR_KEY/pixel.js"></script>
Astro
In src/layouts/BaseLayout.astro:
<script async src="https://harvv.com/px/YOUR_KEY/pixel.js"></script>
Rails (ERB)
In app/views/layouts/application.html.erb:
<%= javascript_include_tag "https://harvv.com/px/#{Rails.application.credentials.harvv_site_key}/pixel.js", async: true %>