Adding Seline to your Next.js site

Adding Seline to Next.js is as easy as importing 'next/script' to load our script.

At your main layout file, add the following code:

import Script from 'next/script';
...
// then in the <head> section
<Script
src="https://cdn.seline.so/seline.js"
data-token="PROJECT_TOKEN" // can be found at General settings
strategy="afterInteractive"
/>
Click anywhere to copy

That's it! Now visit your website, click around a bit, and you should see the events appearing at your Seline dashboard.

To learn how to track custom events, see the custom events documentation.

You can also install Seline via our JavaScript package.