Install recipes
Copy a ready-made snippet for your framework or server code, then verify the first event arrives.
Install recipes generate a snippet from your site’s real script URL, so you do not edit anything by hand.
Add a browser recipe
Section titled “Add a browser recipe”-
Open your site, then Settings → Installation.
-
Pick your platform from the tabs. The browser recipes are HTML, React (Vite, CRA), Next.js, Vue (Vite), Nuxt, SvelteKit, Astro, Remix, Angular, WordPress, Shopify and Google Tag Manager.
-
Each tab shows where the snippet goes, such as
app/layout.tsxfor Next.js orsrc/app.htmlfor SvelteKit. Select the copy button, then paste it there. -
Deploy, then select Verify installation.
What you should see: after you open your site in another tab, the page reports that events are arriving.
Send events from your server
Section titled “Send events from your server”The server recipes (curl, Node.js, Python and Go) post to /api/public/v1/events with your site ID, an event name, the page URL and optional properties. Forward the visitor’s user agent and IP address in the User-Agent and X-Forwarded-For headers so the event joins the right session.
curl -X POST https://analytics.example.com/api/public/v1/events \ -H "Content-Type: application/json" \ -H "User-Agent: $ORIGINAL_USER_AGENT" \ -H "X-Forwarded-For: $ORIGINAL_CLIENT_IP" \ -d '{"site":"YOUR_SITE_ID","name":"Signup","url":"https://example.com/signup","props":{"plan":"pro"}}'Use the recipe in your dashboard rather than this example: it fills in your real host and site ID.
Verify the installation
Section titled “Verify the installation”Verify installation polls the site’s install status until the first event is received, then confirms. If it times out, check that the snippet is inside <head> on the page you opened and that your browser or an extension is not blocking the script.