Getting started

Getting started

Install Ferno and send your first safe event.

You need a project write key first. If you don't have one, create an API key.

Browser#

For Vite, import.meta.env.VITE_FERNO_WRITE_KEY reads the browser/project write key. The explicit cdnSettings ensures events use Ferno's /events endpoint without remote settings discovery.

Before adding broader instrumentation, send one first event and verify it in the browser Network panel:

Confirm the POST request reaches /events and returns a successful HTTP response. Surface rejected SDK promises during development; console logs alone do not prove delivery. Do not put a secret server credential in browser code.

Node#

Keep Node keys in environment variables or a secrets manager.

First instrumentation checklist#

  1. Write the business question the events should answer.
  2. Define an event dictionary with stable names and descriptions.
  3. Track behavior and outcomes, not form values or free text.
  4. Add identify after authentication.
  5. Add server-confirmed events for payment and subscription outcomes.
  6. Review payloads for confidential information before production.

Deploy the generated dist/client directory to your static host.