docs / install

Install knockstat

Four ways in, by where your data is. A site can use more than one; each guide is a few minutes.

Pick by where the data is

MethodUse it forKeyGuide
Script tagPage views, outbound clicks, engagement time and custom events from your pages. One line of HTML.Site keyWebsite tag
npm packagesThe same, bundled into a JavaScript, React or Vue app.Site keyJavaScript, React and Vue
HTTP API and Node SDKEvents your backend knows about: sign-ups, purchases, jobs. Server-side page views.Ingest keyServer and HTTP API
Access logsEvery request your web server already logs, including visitors who block scripts, bots and error pages. No change to your pages.Ingest keyLogs and the agent

Every method needs a site and its key first: see add a site and site key and ingest key on Getting started. The app’s set-up guide at app.knockstat.com/setup shows the same snippets with your keys filled in and checks live that the first events arrive.

Combining methods

A website usually pairs the tag (what people do on the page) with the log agent (every request, including bots, errors and visitors who block scripts). A product adds server events for sign-ups and purchases.

Stuck? Email [email protected].