Skip to content

Docs

Housecount shows how many people are reading your publication right now, what brought them, and which stories and sources lead to subscribers. It is one script tag. Your personal snippet, with your site ID filled in, is in the dashboard after you add your site.

Install

Paste the snippet into the <head> of every page you want to track.

<script defer data-site-id="YOUR-SITE-ID" src="https://YOUR-HOUSECOUNT-DOMAIN/tracker.js"></script>

Events are accepted only from the domain you registered and its subdomains.

Framework guides

Next.js

// app/layout.tsx
import Script from "next/script"

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <body>
        {children}
        <Script
          src="https://YOUR-HOUSECOUNT-DOMAIN/tracker.js"
          data-site-id="YOUR-SITE-ID"
          strategy="afterInteractive"
        />
      </body>
    </html>
  )
}

Astro

---
// src/layouts/Layout.astro
---
<head>
  <script is:inline defer data-site-id="YOUR-SITE-ID"
    src="https://YOUR-HOUSECOUNT-DOMAIN/tracker.js"></script>
</head>

WordPress, Ghost, Webflow, Framer

Each has a setting for custom code in the site head (in Ghost it is Code injection; in WordPress, your theme or a header-scripts plugin). Paste the HTML snippet there and publish. If your platform does not allow custom scripts in the head, Housecount cannot run on it.

Single-page apps need nothing extra: client-side route changes are counted as page views.

Check it works

  1. Publish your site with the snippet in place.
  2. Open your live site in a new tab.
  3. Your Housecount dashboard switches from the install screen to live charts within a few seconds.

Nothing showing? Visits from localhost are ignored, ad blockers may block the script, and browsers with Do Not Track turned on are not counted.

Subscribers and revenue

A goal is any action you care about: a newsletter signup, a new member, a click on an affiliate link. Report one from your own code once the Housecount script has loaded:

// A newsletter signup
window.housecount?.("newsletter signup")

// A new member paying 8 a month
window.housecount?.("membership", { revenue: 8 })

Or mark a button or link, with no JavaScript:

<button data-housecount-goal="newsletter signup">Subscribe</button>

<a href="https://shop.example/item" data-housecount-goal="affiliate click">See the deal</a>

Goal names can use letters, numbers, spaces, dashes and underscores. Revenue is a plain number in your currency. Each goal is credited to the referrer or campaign that started that visit, which is what powers the revenue figures in the Sources panel.

Revenue is the amount your site reports, so send it from your confirmation page or after a successful payment. Tag links with ?utm_campaign=name or ?ref=name to see campaigns.

Social and tracked links

Every visit is sorted into a channel: Search, Social, Newsletter, Paid, Referral or Direct. The Sources panel shows readers, signups and revenue for each, and the Social tab breaks that down by network.

Apps and email clients often hide where a reader came from, so those visits can show up as Direct. A tracked link fixes that. In the Sources panel choose Make a tracked link, pick the page and the network, and post the link it gives you:

https://yoursite.com/news/my-story?utm_source=x&utm_medium=social&utm_campaign=budget-vote-thread

Give each post its own name and the Post tab shows what that one post brought in. Without a tracked link, readers who arrive from a post are still counted under the network, but not under the post.

Bluesky and Mastodon accounts

Connect your publication's Bluesky or Mastodon account from the Social accounts panel. Only the handle is needed: both networks publish profiles and posts openly, so there is no password and no app to approve.

Housecount then shows your follower count and its change over the week, your recent posts with their likes, reposts and replies, and for each post that links to your site, how many readers it sent.

A post that uses a tracked link gets exactly the readers who clicked it. For other posts, readers arriving from that network are credited to your most recent linking post from the previous 48 hours, so close together posts can share credit imperfectly. Follower history starts the day you connect. X, Instagram, Facebook, Threads and TikTok are not supported yet: they require approved developer access.

Funnels and journeys

A funnel is an ordered list of two to six steps, each a page or a goal. Create one from the Funnels panel on your dashboard. A page step ending in * matches everything under it, so /news/* covers every story. A typical one for a publication: any story, then the membership page, then the membership goal.

The Visitor journeys panel lists recent anonymous readers. Open one to see the stories they read and the goals they completed, in order, with where they came from.

An anonymous visitor is only recognised for one day, so by default funnels and journeys cover a single day. To follow people for longer, identify your signed-in users (next section). Journeys are visible only to you, never on a public dashboard link.

Follow members across visits

If readers sign in on your site, tell Housecount who is signed in on each page load. Use your own stable member ID:

// Run on every page while a member is signed in
window.housecount?.identify("member_8142")

From then on, that person counts as one visitor in funnels and journeys across days and devices, including the pages they viewed earlier the same day before signing in. Someone who joins the newsletter on Monday and becomes a member the following week now completes the funnel.

Housecount stores only a one-way hash of the ID, never the ID itself, and still writes nothing to the visitor's browser. Prefer an internal ID over an email address. Visitor totals on the main dashboard are unchanged and still count daily uniques.

What we collect

Page path
The path of the page viewed, without the query string.
Referrer
Only the hostname of the site that linked to you.
Campaign tags
utm_source, utm_medium and utm_campaign, when present in the URL.
Device
Device type, browser and operating system, read from the user agent.
Location
Country, region and city, derived from the IP address and rounded to roughly 11 km.
Time on page
Seconds the tab was visible.
Read depth
How far down the page the reader scrolled, as a percentage.
Goals
The goal names and revenue amounts your own code reports.
User link
If you identify signed-in users: a one-way hash of the ID you pass. The ID itself is not stored.

What we do not collect

  • No cookies, localStorage or any other browser storage.
  • No IP addresses are stored. The IP is used in memory to derive location and a daily hash, then discarded.
  • No cross-site or cross-day identifier. The visitor hash uses a random salt that is deleted every day.
  • No names, emails, form contents, keystrokes or session recordings.
  • Browsers sending Do Not Track or Global Privacy Control are not counted at all.

Because the visitor hash rotates daily, someone who returns on a different day is counted as a new visitor. Multi-day visitor totals are therefore the sum of daily uniques.

Open house

In Settings, turn on Public dashboard for a website to get a read-only link to your numbers, useful for sponsors and advertisers, and a weekly house card image you can post. Visitor journeys are never included. Turn it off and the link stops working immediately.