pieowl

Use case · Next.js

Analytics built for Next.js.

Add one script to your root layout and Pieowl tracks page views, including client-side route changes. Send events from server code too, and get funnels, retention and user profiles on the same data. No cookies.

  • App Router & Pages Router
  • Server-side events
  • Auto route tracking
  • About 3 KB gzipped
Events · liveDemo data
pieowl.track('purchase', { amount: 49 })
  • purchase/checkout12:04
  • signup_completed/signup12:01
  • button_clicked/pricing11:58
  • screen_view/11:57
Updated just now

The problem

What makes analytics tricky in Next.js

Next.js apps mix server and client code and change routes without full page loads. Analytics has to handle all of that.

4 problems teams run into
  • 01

    Client-side navigation

    Links and router calls change the page without a full reload. Your analytics has to notice those route changes to count page views.

  • 02

    Consent logic in your app

    Cookie-based analytics often means consent state, conditional script loading and a banner, all before you track a single event.

  • 03

    Events that happen on the server

    Payments, server actions and API routes run on the server. A browser-only SDK can't see them.

  • 04

    Ad blockers drop requests

    Requests to third-party analytics domains are often blocked, so some visits never reach your reports.

What you get

Analytics that works the way Next.js works

Pieowl fits current Next.js patterns: a script in the root layout, plus small server packages where you need them.

  • One script in your root layout

    Add the Pieowl script to your root layout with next/script. It loads the tracker and starts tracking, in the App Router or the Pages Router.

  • Automatic route change tracking

    Every Link navigation, router push and back or forward step is counted as a page view, with no extra code.

  • Server-side event tracking

    Create a Pieowl instance from @pieowl/sdk with your client ID and secret and track events from route handlers, server actions and background jobs.

  • No cookies

    Pieowl sets no cookies, so in many cases you don't need a consent banner just for Pieowl analytics. Where you do, start it disabled and call ready later.

  • Identify users

    Call window.pieowl('identify') after login to link events to your user ID. Works with any auth library that gives you a user ID.

  • Proxy through your own domain

    createRouteHandler from @pieowl/bots/route-handler serves the script and forwards events through your own domain, so fewer events are lost to ad blockers.

  • AI crawlers and search bots

    Crawlers don't run JavaScript, so the script can't see them. Add trackBots from @pieowl/bots/next to proxy.ts to count GPTBot, ClaudeBot, Googlebot and others.

Why Pieowl

Why Next.js developers choose Pieowl

Pieowl fits into a modern Next.js codebase without extra plumbing.

Five reasons
  • Works the way Next.js works

    A script in the root layout, window.pieowl('track') in client components, and a server-side client for route handlers and server actions.

  • No cookie plumbing

    No cookies, so in many cases no consent state just for analytics. Install once and it works everywhere.

  • Server and client events in one place

    Server actions, API routes and clicks all land in the same site, so funnels and profiles see the whole picture.

  • Ask from your editor

    Connect Cursor or Claude Code to the MCP server and ask about funnels or users while you build.

  • Clear prices

    Starter from $9 a month for 10K events, $19 for 100K, $69 for 1M, every feature on every plan. 14-day free trial, no card needed.

FAQ

Frequently asked questions

Common questions from Next.js developers looking at Pieowl.

How do I install Pieowl in a Next.js app?

Add the Pieowl script with your client ID to your root layout using next/script. Page views start coming in. For custom events, call window.pieowl('track') in client components. The Next.js guide walks through every step.

Does Pieowl support the App Router?

Yes. The script listens for browser history changes, so client-side navigation in the App Router and the Pages Router is counted as page views without extra setup.

Can I track events in server code?

Yes. Create a Pieowl instance from @pieowl/sdk with your client ID and client secret, then call track in route handlers, server actions or background jobs. On serverless platforms, make sure the request finishes before the function ends.

Does it work with my auth library?

Yes. After login, call window.pieowl('identify') with the user's ID. Anything that gives you a stable user ID works.

Will it make my bundle bigger?

The tracking script is about 3 KB gzipped and loads asynchronously from a script tag. The session replay recorder only loads if you turn replay on.

Your first dashboard in five minutes.

14-day free trial, no card needed. Then from $9 a month for 10K events.