Skip to main content

Script tag

The simplest way to add Toffee. Drop this before </body>:
The SDK auto-initializes and starts detecting immediately.

npm

Then initialize in your application code:

React

Next.js

Vue

Tracking pixel

For environments where JavaScript doesn’t execute (curl, CLI tools, server-side rendering), use the tracking pixel:
Or request it directly:
The pixel returns a 1x1 transparent GIF and records a pageview event with detection based on the request headers.