DEV Community

Om Yaduvanshi
Om Yaduvanshi

Posted on

i install analytics with one script tag. here is what breaks most often

most analytics installs ask for a plugin, a plan, and an afternoon of configuration. mine asks for one line.

i'm om yaduvanshi, 18, an applied ai developer. i built cloudline, a cookieless analytics tool. day 33 now, eight days past launch, and the install page has taught me more than the dashboard has.

the install itself

one script tag. under 2 kb. you paste it in, with your site id, and it installs in under a minute. single-page apps work automatically. no dashboard to configure first.

if you ever want it gone, you delete that one line. that is the whole uninstall.

the same line, four frameworks

next.js takes it in the root layout, with next/script and afterInteractive. wordpress takes it through the WPCode plugin, or straight into header.php before the closing head tag. webflow and framer take it as custom code in the head.

same tag everywhere. the framework changes where it lives, not what it does.

cloudline dashboard

what breaks most often

first, check the realtime view. if a visit lands there, the install works, and the problem is somewhere else in how you are reading the dashboard.

if nothing lands, the usual suspects are short. a content security policy blocking the script or the connection. an ad blocker on your own browser, hiding your own visits from you. a localhost visit, which production refuses on purpose. a domain that does not match the site id.

all four are on the install page. i put them there because i kept answering the same questions.

cloudline visitors over time chart

button clicks, the same way

a button gets tracked when you add a data attribute with a label, or call the track function with one. only the label you chose is stored. nothing about the person who pressed it.

why the install stays this small

a pageview stores page, referrer, screen size, time. nothing else. no cookies. no ip addresses. nothing stored on a visitor's device. there is nothing to configure because there is almost nothing being collected.

cloudline is free while in early access. no card.

https://trycloudline.space

— om

Top comments (3)

Collapse
 
refaeldakar profile image
Refael Dakar •

the realtime-view-first order is a good call. one thing that bites people after the install works: the script gets blocked or removed in a later deploy (a CSP change, a layout refactor) and the dashboard just goes quiet, which looks the same as a slow week. a simple "zero pageviews for this site id in the last 24h" check would catch it before the customer does. do you alert on that today?

Collapse
 
omyvnss profile image
Om Yaduvanshi •

good catch, and yeah this one bites quietly. the dashboard going silent looks exactly like a slow week, which is the worst part. no alert for that today, the install page just covers the troubleshooting side. a zero-pageviews check is a good idea though, cheap to build and it catches the problem before the customer notices. adding it to the list.

Collapse
 
omyvnss profile image
Om Yaduvanshi •

good catch, and no, i don't alert on that today. the dashboard going quiet looks exactly like a slow week, which is the worst kind of failure because nobody notices. a zero-pageviews-in-24h check is the obvious fix, it's on my list now. thanks for spelling it out.