Cloudline 如何在不使用 Cookie 的情况下统计实时访客
how i count live visitors without cookies
18 岁开发者 Om Yaduvanshi 为无 Cookie 分析工具 Cloudline 推出"visitors, live"实时视图,只统计当下发生的 pageview,不拼接会话、不存储 IP、不使用 Cookie,脚本不到 2 KB。该数字反映的是活跃访问量而非已识别的具体人数,因此无法关联同一访客在不同页面的行为。Cloudline 目前对早期用户免费,接入只需一行代码。
someone is on your site right now. your analytics can't tell you that without a consent banner.
i'm om yaduvanshi. i'm 18, an applied ai developer building cloudline, a cookieless google analytics alternative. one script tag, under 2 KB, no cookies, no stored ips. this continues my series on tracking the web without tracking people. so far i've covered referrers, scroll depth, funnels, button clicks, and engaged time.
live visitors usually means sessions
most analytics tools show "real-time" visitors. what they really show is open sessions. a session is a bundle of pageviews stitched together with a cookie or a fingerprint. the tool watches its bundles and counts the ones that moved recently.
that's fine when it works. it needs an identity layer underneath. every "user online now" number is paid for with stored identifiers.
what cloudline counts instead
cloudline's live view is dumber, and i mean that as a compliment.
the dashboard has a section called "visitors, live." it shows today's visits arriving in real time. a visit is a pageview that happened. nothing gets stitched to anything else, because there's nothing to stitch with. the pageview stores the page, the referrer, the screen size, and the time. no cookies, no ip storage, nothing on the visitor's device.
so the number on screen is a count of active visits, not of identified people. someone opened your post. it's counted. they closed the tab. it stops being counted. nobody was identified at any point.
why launch days made me build it
i built this for the moments when the number actually matters. a post hits the front page of some feed and you want to watch the wave arrive. total visits tomorrow morning tells you it happened. live visits tells you it's happening.
the cookieless version does this job fine, because the job was never "know exactly who is here." the job was "is anyone here right now."
the honest limit
aggregation has a cost, and i keep saying this because it keeps being true. cloudline can't tell you that the live visitor on your pricing page is the same person who read your docs this morning. there are no profiles, no "this visitor also viewed" trails. the dashboard counts visits and doesn't pretend to connect them.
if you want to know who your visitors are, this tool is not for you. if you want to know what your pages are doing, it's enough.
one line, under a minute
if you haven't installed yet:
<script src="https://trycloudline.space/tracker.js" data-site-id="YOUR-SITE-ID"></script>
takes under a minute. removing it is deleting the line.
cloudline is free for early users while i keep building it. cookieless analytics in one line of code.
— om yaduvanshi
来源:Google AI:DEV 作者专属(RSS) · dev.to

