Documentation
How to add Lyli to a site, send events and revenue, and read each report.
Start with one line
Paste the tag before </head> on every page, or once in your app’s root layout. The script is about 1 KB, and we confirm the first page view within seconds.
<script defer src="https://app.lyli.io/t.js" data-site="s_k3m9x2p7qa"></script>s_k3m9x2p7qa stands for your site’s ID. The tag with your own ID is in Settings › Install.
Install the scriptGuides to start with
Install the script
One line of HTML, or the Script component in a Next.js layout.
Read the guideSend custom events
Count sign-ups and payments with window.track, revenue included.
Via your domain
Serve the script from your own domain, so visitors whose content blockers stop analytics hosts are counted.
Read the guideImport from Google Analytics 4
Bring a site’s history over. Overview and Goals & events show it for the days before you installed Lyli.
Read the guideReports
What each report counts, how to read it, and which settings change it.
Privacy and data
Cookieless by default: the script sets no cookies and stores nothing in the browser. Whether you need your visitors’ consent even so depends on the country; in Sweden and Germany, assume you do (consent, by place). Each visitor gets a daily code that can’t be followed from one day to the next. Turn on returning visitors and you need consent in the EU and UK; for individual visits, replays, or heatmaps, assume you do. These articles say when.
- What we keep, and what we never keep
- Recognize returning visitors: what the script keeps in the browser
- Consent for replays and heatmaps: both wait for the visitor’s consent by default
- How long we keep data