Skip to content

Site analytics

Pageviews, visitors, referrers, campaigns, countries and custom events for every site you own — on HostStack or anywhere else. One script tag, nothing stored on the visitor's device, and so no consent banner.

How it works

You add a site by hostname and paste a script tag into its pages. The tag, about 4 KB gzipped, reports each pageview to HostStack; the dashboard's Analytics page shows every site you track on one page, so "how did everything do this week" is one glance rather than six logins. Error tracking, uptime checks and search data sit alongside it — see the monitoring overview.

  • Any site. It does not have to run on HostStack. If it does, it also appears on that service's Analytics tab.
  • What you see: pageviews, visitors, bounce rate, visit duration, visitors online now, and top paths, referrers, campaigns (UTM), countries, devices, browsers, operating systems, languages, screen sizes and custom events.
  • What it never does: set a cookie, write to the visitor's device, or store their IP address.

Set it up

  1. Add the site

    Open Analytics in the dashboard and click Add site. Enter the bare hostname — example.com, not a URL. If that domain is attached to one of your services, the site is linked to that service automatically.

  2. Paste the snippet into your pages

    Put the tag from the site's Install card in your <head>, then deploy:

    index.html
    <script defer src="https://hoststack.dev/t.js" data-site-key="site_..."></script>
  3. Check that it's receiving

    Load a page, then read the Status panel on the site's page (it refreshes every 30 seconds), or run hoststack analytics check example.com. It should say Receiving events. If it doesn't, see Why is it showing zero?

The site key (site_…) is public by design: it sits in an HTML attribute anyone can read. It can only add events to one site and read nothing. What protects the endpoint is the origin check and the hourly quota, described under Limits.

Custom events

The tag exposes one global, window.psAnalytics, with track(name, metadata) for events and pageview(path) for apps that report their own routes.

javascript
// Anything worth counting that isn't a pageview.
window.psAnalytics?.track('signup_started', { plan: 'pro' });
window.psAnalytics?.track('checkout_completed', { plan: 'pro', currency: 'EUR' });

// Optional-chained on purpose: the tag loads with defer, and psAnalytics
// does not exist until it has run. A call before that is lost, not queued.
  • Event names are up to 64 characters.
  • Metadata is optional: up to 32 keys of up to 64 characters each, and 4 KB of JSON in total. An event over those limits is refused.
  • Click an event under Top events in the dashboard to see its metadata broken down.

The tag also sends a session_end event on its own, once per page, when the tab is hidden or closed. It carries only the time spent on the page and is what visit duration is computed from.

Apps behind a login

A logged-in product puts record IDs in its URLs — /customers/123, /orders/ord_9f2a, /patients/9. Reporting those verbatim is not a reporting problem, it is an exfiltration one: identifiers land in an analytics store that has no business holding them, and Top paths shreds into one row per record. Turn the automatic pageview off and report the route instead.

index.html
<script defer src="https://hoststack.dev/t.js"
        data-site-key="site_..."
        data-auto-pageview="off"></script>
javascript
// Report the route TEMPLATE, not the URL the visitor is on.

// TanStack Router — the deepest match carries the template as its routeId:
router.subscribe('onResolved', () => {
  const matches = router.state.matches;
  window.psAnalytics?.pageview(matches[matches.length - 1].routeId);
  // -> /dashboard/customers/$customerId
});

// React Router — hang the pattern on the route's handle and read it back:
//   { path: 'customers/:customerId', handle: { analytics: '/customers/:customerId' } }
const match = useMatches().at(-1);
window.psAnalytics?.pageview(match?.handle?.analytics);

// Next.js, pages router — router.pathname is already the template:
window.psAnalytics?.pageview(useRouter().pathname); // -> /customers/[id]
// The app router has no template hook: usePathname() gives you the resolved
// URL, ids and all, so pass the string you route with instead.

With data-auto-pageview="off" the tag never reads the address bar at all:

  • No automatic pageviews, and no history hooks for single-page navigation.
  • A track() call before your first pageview() reports no path rather than the live one.
  • pageview() with no path does nothing (with data-debug it warns in the console).
  • A referrer from your own site is not sent: it would be the previous URL, ID and all, and it is worth nothing as attribution. Browsers already trim referrers from other sites to a bare origin.

Only an absent attribute, or on, true, 1 or yes, leaves automatic pageviews on. Anything else — including a typo — turns them off: a typo costs you pageviews, which you will notice, rather than leaving the leak open, which you would not.

Paths are scrubbed anyway

You don't have to do any of this to be safe by default. At ingest, the query string is dropped from every path (UTM parameters are kept, in their own columns), and a path segment that looks like an ID is stored as :id:

  • a bare number, a UUID, or a hex string of 16 characters or more;
  • a prefix_body ID whose body is 8 or more characters with a digit in it or mixed case — ord_9f2a41c8, cus_ABCdef12.

So /customers/123 is stored as /customers/:id. Dated permalinks like /2024/06/12/the-post and snake_case slugs like /docs/site_analytics are left alone. A referrer from one of the site's own hosts gets the same treatment; referrers from other sites are stored as they arrive. That is still a guess about your URL scheme, and it cannot recover the name of the route — which is why reporting the route yourself is better.

What happens
Cookies and device storageNone by default. The only thing the tag reads from localStorage is an opt-out flag (below), and it never writes to it unless you add data-storage="local".
IP addressUsed at ingest to look up a country and derive the session ID, then discarded — there is no IP column. The country lookup uses a GeoIP database on HostStack’s own servers, so the address is not sent to a third party.
VisitorsA session ID is a hash of IP address, browser user agent and site, salted with a random value generated each UTC day. The salt lives only in Redis and expires after three days. Someone who visits on Monday and Thursday is two visitors, nothing links them, and once the salt is gone no IP address can be matched to a past day’s events.
Across sitesThe site is part of the hash, so one person on two of your sites is two unrelated IDs. Visitors are always reported per site and never added into one total.
Do Not TrackHonoured: the tag does nothing when the browser sends DNT. A visitor (or your own site) can also opt out permanently by setting ps_as_opt_out to 1 in localStorage.
BotsObvious crawlers, headless browsers, Lighthouse, uptime monitors and command-line clients (curl, wget, python-requests) are not counted, and neither are prefetches. Neither are headless crawlers that fake an ordinary desktop browser: they are recognised by a screen no monitor has (a 1600×1600 square, a Linux 800×600) together with how they behave — dozens of pages an hour from one visitor, or the same odd screen from many visitors in a day, or an hour of direct visitors spread evenly over a handful of screen sizes, or all on one screen size and arriving from many countries at once. Scrapers that drive a real browser and hide that it is automated are caught in the browser: before it counts anything, the tag checks for what a disguised browser contradicts itself on (a Windows user agent on a Linux system, a software or faked graphics renderer, graphics switched off on a desktop) and waits for the server to say yes.
Deleting a siteDeletes every event and every daily rollup row for it immediately, not on a schedule.

ePrivacy art. 5(3) — in Denmark, the cookiebekendtgørelse — governs storing information on a visitor's device or reading it back. It is technology-neutral: localStorage counts exactly as a cookie does, and the only exemption is for storage strictly necessary to deliver what the visitor asked for. Analytics is settled as not that, so any tag that stores an ID needs prior consent — which means a banner. This tag stores nothing, so the rule never engages. (Reading ps_as_opt_out, a key the tag never writes, honours an opt-out the visitor recorded themselves: the strictly-necessary case the exemption exists for.)

The price is a little precision. Two people behind one office NAT on the same browser version count as one visitor for the day, and a phone that moves between wi-fi and mobile data counts as two.

data-storage="local" puts a random session ID in localStorage (under ps_as_sid), rotated once a UTC day. It is off unless you add it, and only the value local turns it on — a typo leaves storage off rather than switching it on behind your back.

index.html
<!-- Default: nothing is stored on the device. -->
<script defer src="https://hoststack.dev/t.js"
        data-site-key="site_..."></script>

<!-- Opt in to a client-side session id. Needs prior consent in the EU:
     load this tag only after the visitor has agreed. -->
<script defer src="https://hoststack.dev/t.js"
        data-site-key="site_..."
        data-storage="local"></script>

Ranges, retention and what the numbers mean

Ranges are the last 24 hours, 7 days, 30 days, 90 days and 12 months. Raw events are kept for 35 days by default — five more than the 30-day range, so its first day is never missing. A range longer than a site's retention is answered from a daily rollup instead, and that changes what one number means, so the dashboard says so:

From raw eventsFrom the daily rollup
Default ranges24 hours, 7 days, 30 days90 days, 12 months
Visitor metricUnique visitors — a true distinct count over the whole rangeDaily visitors, summed — each day's uniques added together, so a daily reader counts once per day
FiltersClick a country, browser, path, campaign and so on to narrow everything elseNot available
BreakdownsEverything, including screen sizes and UTM term and contentNo screen sizes, UTM term or content; the top 200 values per breakdown per day, the rest grouped as (other); channels, sources and entry pages from 2026-10-06 onwards

Raise a site's retention (up to 365 days) with hoststack analytics set example.com --retention 365 to keep longer ranges exact and filterable. When you look at several sites at once, the rollup is used as soon as the range is longer than the shortest retention among them.

Where visits come from

Every visit is attributed once, from the page it started on: its source, its channel, its entry page and its campaign. The Channels, Sources, Entry pages and Campaigns cards count visits, not pageviews — a visitor who arrives from Google and reads five pages is one visit from Google.

ChannelWhat puts a visit there
Organic searchA referrer from Google, Bing, DuckDuckGo, Ecosia and other search engines
Paid searchAn ad click id (gclid, gbraid, wbraid, msclkid) or utm_medium=cpc from a search engine
SocialFacebook, Instagram, LinkedIn, X, Reddit, YouTube and the like — including their in-app browsers, which usually send no referrer
Paid socialttclid, li_fat_id, twclid, or a paid utm_medium from a social network
AI assistantsChatGPT, Perplexity, Claude, Gemini, Copilot
Emailutm_medium=email or a webmail referrer
ReferralAny other site
DirectNo referrer, no tags — a typed URL, a bookmark, an app that hides where it came from

An ad click with no UTM tags still shows up under Campaigns, as (click id) with the ad network as its source. fbclid is the exception: Facebook adds it to every outbound link, shared or paid, so it proves the visit came from Facebook but not that it was an ad. Click ids are read and then dropped — the stored path never carries them.

Click a channel, source, entry page or campaign to filter the whole page to those visits: every page they read and every custom event they fired. That is how you see which channel your conversions came from — the Events by channel card shows it without a filter. The card you filtered on keeps listing every value, so you can switch to another.

The site's own pages are never a source, and the same site is one row however the browser spelled it: google.com, google.dk and the Android Google app are all Google. Only the host of a referrer is kept, never its path.

Leave out your own traffic

Browsers driven by automation — Playwright, Puppeteer, Selenium, Lighthouse, PageSpeed Insights — are not counted. The tag checks navigator.webdriver and the user agent and stays silent, and the server refuses headless and Lighthouse user agents too. Your end-to-end tests can keep calling psAnalytics.track(): it is a no-op there, not an error. Add data-count-automation to the script tag if you do want those runs counted.

To leave out your own visits, list the IP addresses or CIDR blocks they come from under Your own traffic on the site, where Exclude my connection adds the one you are on. For an IPv6 connection it adds the /64, because your address within it changes every day. From a terminal:

bash
hoststack analytics set example.com --exclude-me
hoststack analytics set example.com --excluded-ips 203.0.113.7,2001:db8:1:2::/64

If your address changes too often for a rule to keep up — a phone, a laptop on the move — opt the browser out instead. Open your site, then run this once in the browser console (or have your admin pages set it):

javascript
localStorage.setItem('ps_as_opt_out', '1')

The tag then stays silent in that browser on that site for good. Remove the key to be counted again.

Rules are checked when an event arrives and are never stored with it. Left-out traffic is counted as refusals — excluded, automation and headless — on the site's status card and in hoststack analytics check, so a filter working is visible rather than silent, and never reads as a broken setup. The status card also says which signal kept each automated or headless visit out.

Before it sends anything, the tag posts the result of its browser check to /api/track/<key>/check and waits for the answer. If you proxy the ingest under your own domain with data-endpoint, forward /check as well as /event. A proxy that answers 404 for it still counts as before, without the check. If your Content-Security-Policy allows the ingest for connect-src, it already allows the check.

Script tag attributes

data-site-key
stringrequired

The site's key, site_….

data-auto-pageview
on | off

off to report pageviews yourself — see Apps behind a login. Anything other than on, true, 1 or yes means off.

Default: on

data-storage
local

local keeps a day-scoped session ID in localStorage. Needs consent.

Default: none

data-endpoint
URL

Send events somewhere other than https://hoststack.dev — for example your own proxy of /api/track/ on your domain, which content blockers leave alone. The tag appends /api/track/<site-key>/event.

data-count-automation
boolean

Count visits from automated browsers (navigator.webdriver, headless Chrome, Lighthouse), which are left out by default.

data-debug
boolean

Log to the console what the tag is doing: the endpoint it resolved, the mode it is in, each accepted event, and every failure it would otherwise swallow.

Limits

  • Origin. Events are accepted from the site's domain and its subdomains. To serve the same site from another hostname, add it (up to 20) with hoststack analytics set example.com --allowed-origins a.com,b.com — the flag replaces the list, and "" clears it. Requests with no Origin header, such as server-side forwarding, are not origin-checked.
  • 50,000 events per site per hour. Over that, events are refused and counted, and the dashboard shows how many next to the chart they would otherwise have deflated. Nothing is dropped silently.
  • 60 requests a second per IP address at the ingest endpoint.
  • Rotating a key (Rotate key on the Install card, or hoststack analytics rotate) issues a new one immediately and keeps the old one working for 30 days, so rotating is never an outage.

Why is it showing zero?

The ingest endpoint answers 204 to every well-formed request, including one with a key it has never seen. That is deliberate — a status code that told a real key from a typo would let anyone test keys until they found a live one — but it means very different problems produce the same empty chart. So the answer lives behind your login instead: the Status panel on the site's page, or hoststack analytics check example.com, says which of these you have, from the last seven days of refusals.

Receiving events.

An event arrived in the last hour. If it says Receiving events, and refusing some., it names what is being refused.

Reaching us, and being refused.

Requests arrive and are turned away — a stale key still deployed after a rotation's 30 days, a hostname that is not the site's domain or an allowed origin, or the hourly quota. The panel names which, and how many.

No events recently.

Events have arrived before, but none in the last hour. The setup works: either there is no traffic, or the snippet has since been removed.

Nothing has ever reached us.

No event and no refusal, so requests are not leaving the browser: the snippet is missing from the deployed HTML, or /t.js is blocked by an ad blocker or a Content-Security-Policy. Or automatic pageviews are off and nothing calls pageview() — the tag is then doing exactly what it was told.

To tell those last cases apart, add data-debug to the tag. Its first console line says which mode it is in (for example automatic pageviews off), and each event it sends is logged as accepted (HTTP 204) — a confirmation from a real browser, the only client whose opinion counts. A curl that lands proves nothing about a page: cross-origin rules are enforced by browsers, and curl is not one (and is filtered out as a bot anyway).

index.html
<script defer src="https://hoststack.dev/t.js"
        data-site-key="site_..." data-debug></script>

Report without the script

The tag is a convenience, not a requirement. Anything that can POST JSON can report — a server-rendered app, a mobile client, a worker. Forwarding events from your own server is a supported setup: it keeps connect-src at 'self' in your CSP and puts the request on a first-party path that content blockers leave alone.

bash
curl -X POST https://hoststack.dev/api/track/site_.../event \
  -H 'content-type: application/json' \
  -H "user-agent: $VISITOR_USER_AGENT" \
  -d '{
    "eventType": "pageview",
    "sessionId": "1c9d5c861a9e4a6f9b7d6f6b0f3c2b41",
    "urlPath": "/pricing?utm_source=newsletter",
    "referrer": "https://news.ycombinator.com/",
    "language": "en-GB"
  }'
eventType
string

Up to 64 characters.

Default: pageview

urlPath
string

Path and query string, up to 2,048 characters. UTM parameters are read from the query string.

referrer
string

Up to 2,048 characters.

sessionId
string

8–64 characters. See below.

screenWidth, screenHeight
number

0–20,000.

language
string

A language tag such as en-GB, up to 32 characters.

metadata
object

Up to 32 keys and 4 KB, as for custom events.

Visit duration comes only from session_end events — an eventType of session_end with { "metadata": { "durationMs": 41250 } }, sent once per page when it is hidden or closed (visibilitychange to hidden, or pagehide), with the same sessionId as its pageviews. The tag does this for you; your own tracker has to do it too, or the site's average visit stays empty and the API says why in avgDurationUnavailable. A backend reporting events of its own has no way to know dwell time; a forwarder of browser beacons does, if it passes session_end on.

A forwarder sees the world from your server, which changes three things:

  • Send a sessionId. Left out, ingest derives one from the IP address it sees — your server's — so every visitor collapses into one session. Make it something that cannot outlive a day: a hash of the visitor's IP address and user agent with a salt you rotate daily and discard. Never a user ID, an email, or anything stable enough to follow someone across days.
  • Pass the visitor's User-Agent. Browser, OS and device come from it, and a request with your HTTP client's own user agent (curl/…, python-requests/…) is dropped as a bot.
  • Countries will be your server's. The country is looked up from the connecting IP address, and there is no field to pass the visitor's.

Prove the domain is yours

Analytics does not need this — skip this section if analytics is all you want. The site key only labels events your own pages send about themselves, so claiming a hostname you don't own buys nothing but a wrong number in your own dashboard.

It matters for one thing: an uptime check on a site HostStack doesn't host. That check makes HostStack request your URL on a schedule, from its own IP address, so it is only pointed at a hostname you have shown is yours.

  • If the domain is already verified on a service in your team, it is proven and there is nothing to do.
  • Otherwise publish the TXT record shown on the site's page — at _hoststack-verify.example.com, with a value starting hoststack-verify= — and check it.
bash
hoststack analytics verify example.com          # shows the TXT record to publish
hoststack analytics verify example.com --check  # reads DNS and gives the verdict
hoststack uptime set --site 3 --path /          # 3 = the site's ID from: hoststack analytics sites

The record is read from your domain's own nameservers rather than through a cache, so one you have just published works immediately instead of being hidden by a negative cache. Once verified, a domain stays verified: a DNS lookup that fails, or a record you later remove, does not undo it.

Google Search Console

The script counts the visits a page gets. It cannot see a page that stopped being shown in Google: nobody clicks a result that is not there, so there is no visit to be missing and the chart looks merely quiet. Linking the site to its Search Console property adds what only Google knows — queries, impressions, average position and whether each sitemap URL is indexed — and an alert when a page falls out of search.

  • Link it from the site’s Search Console card on the Analytics page. Either use the Search Console client you already saved under Settings → Coding Agents (with its read token), or, where offered, Connect with Google. You pick the property from the list Google returns — a Domain property (sc-domain:example.com) or a URL prefix (https://example.com/).
  • Every site at once: open Analytics → Search and use Link all sites under Google Search Console. Each site is matched to the property that covers it. Turn on Let agents link sites with my Search Console access there and agents, the CLI (hoststack analytics gsc connect --all) and the connect_search_console MCP tool link sites directly with your access instead of asking you. Turn it off at any time; it also ends when you leave the team.
  • From an agent or a terminal, hoststack analytics gsc connect example.com (or the connect_search_console MCP tool) prints a link to that same card. Send it to the site’s owner: it needs their HostStack login, so it is safe to paste. The site reads pending for 15 minutes, then active once they have linked it — hoststack analytics gsc status shows which, and whether the first 90 days are still being pulled. Linking always takes a person: Google grants read access to a Search Console account, not to a script.
  • New sites link themselves. Once a day, a site added after the others that a linked Domain property already covers — a new subdomain of sc-domain:example.com, say — is linked with the same member’s credential. A site you unlink stays unlinked.
  • Data arrives once a day and ends two days back, because that is how late Google reports a day. The first sync pulls the last 90 days within a minute, then walks back a month at a time to everything Google keeps (about 16 months), so the 12-month view and period comparisons fill in. Until it has, the report says how far back it reaches; days before that are not loaded, not zero. Clicks are a lower bound: Google leaves rare queries out, which is also why the queries never add up to the page totals. A rate-limited or failing Google call is retried with backoff; a link that syncs but gets nothing back for a week says so, and why it may be (a URL-prefix property for the other www/http spelling is the usual cause).
  • Every figure is compared with the same number of days before it, with a daily chart of clicks and impressions, and broken down by country and device.
  • Queries and pages can be filtered, sorted and exported as CSV. Open a page for its daily figures and the queries it was shown for, or a query for the pages it showed (hoststack analytics search … --page / --query, or the get_search_console_detail MCP tool). Top pages sit next to the visits your own tracker counted arriving from a search engine on the same page and days.
  • Index state is checked weekly for up to 200 URLs from your /sitemap.xml with Google’s URL Inspection, and flags a page Google last crawled before your service’s latest deploy. A noindex, a canonical pointing elsewhere or a redirect is counted as excluded on purpose, not as a problem.

analytics.search_cliff fires when a page whose typical (median) day over four weeks had at least five impressions averages a fifth of that or less over the following two — once per page, until it recovers. A median because one or two spike days, such as someone paging through site: results, would otherwise inflate a quiet page into one that seems to have fallen. Only days the page averaged a position in Google’s top 20 count, so a page that drifts off page three does not raise it. When URL Inspection last found the page indexed, the alert says so: the page lost ranking, not its place in the index. analytics.search_indexing fires when a sitemap URL Google had indexed no longer is, or Google reports errors reading a sitemap. Route both under alert channels. Unlinking deletes the pulled data from HostStack and, for a Connect with Google link, revokes the grant at Google; nothing personal is stored either way.

Bing Webmaster Tools

Bing is a smaller share of search than Google, but its index is also what ChatGPT and Copilot search. Linking a site to Bing Webmaster Tools adds its clicks, impressions, top queries and pages, how many pages Bing has indexed, and the state of each sitemap.

  • One key per team. Bing gives each Webmaster Tools user one API key (Settings → API access) that reads every site they have verified. A team admin saves it once, on any site’s Bing card or with hoststack analytics bing key set. Bing checks it before it is stored. It is kept encrypted, and only its last four characters are ever shown.
  • Then link every site at once with Link all sites, hoststack analytics bing connect --all or the connect_bing MCP tool. Because the key is the team’s, an agent can do this with no one signing in. A site is matched to the Bing site on the same host (www. included). A subdomain needs its own Bing site. Sites Bing has not verified are listed; Bing’s Import from Google Search Console adds every verified Google property in one step. Running it again is safe: sites already linked keep their link, and every linked site syncs right away rather than at the next daily pull.
  • Totals are daily; queries and pages are weekly, because that is the only way Bing reports them. The report names the weeks it adds up, which need not line up with the date range. Data is pulled once a day.
  • Sitemaps are submitted for you. When Bing lists no sitemap for a linked site, HostStack finds them (robots.txt Sitemap: lines, else /sitemap.xml and /sitemap-index.xml) and submits them to Bing, an index in place of its children. That happens on the first sync after linking, and again only if the site’s sitemaps change or Bing still lacks one a week later. The Bing card and get_bing_status show what was submitted, and when.

A site added after the key was saved is linked automatically the next day, once Bing has it verified. Removing the key pauses every linked site and keeps its history; saving a key again resumes them. Unlinking a site deletes its Bing data from HostStack, and it stays unlinked.

SEO audit

The SEO tab audits a site the way a crawler reads it: the front page, its robots.txt, llms.txt and sitemaps, and up to 30 more pages: the pages with the most Search Console impressions first, then the menu, then the sitemap, no more than three from one folder. The sitemap’s share moves on each run, so a large sitemap is covered over a few weeks. Google PageSpeed (Lighthouse, mobile) runs beside it. It runs every Tuesday for every site with a proven domain, and whenever you press Run audit, hoststack seo audit <domain> or the run_site_audit MCP tool.

  • Scores for speed, SEO, GEO (can an answer engine read and quote it), trust, and — for a site that presents as a local business — local visibility. A pass counts 1, a warning half, a failure 0. When PageSpeed answers, the speed score is half Lighthouse’s performance score, and LCP, TBT, CLS, FCP and real visitors’ Core Web Vitals are findings of their own, judged by Google’s thresholds.
  • Top priorities list failures first, ordered by how much fixing them moves the site: a page Google is told to skip outranks a missing image alt text.
  • Site-wide checks: pages without a title, description or h1, repeated titles, canonicals pointing at another page, broken links from the front page, pages that are noindex, a sitemap that is gone or lists dead or redirecting pages, internal links that redirect, canonicals pointing at a 404 or a redirect, a missing page answering 200 (a soft 404), titles and descriptions too long for results, hreflang errors, broken JSON-LD and http:// resources on https pages. They need at least one other page read and are left out when none could be.
  • Next to Search Console: each page the audit read shows its last 28 days of Google clicks and impressions, so a page with no description that Google shows but nobody clicks stands out.
  • PHP: when the server names its PHP version, an end-of-life branch fails. A version below the PHP2Shell fix (CVE-2026-109618/-109619) only says to ask your host, because hosts backport fixes without changing the number.

The audit only sends GET requests a browser would send, through the same guard as uptime checks, and never probes for exploits. Every run is kept for a year so the tab can show the trend and what changed. analytics.seo_audit fires when a run newly fails one of: the front page becoming non-indexable, a page that was indexable last time turning noindex, broken links, an end-of-life PHP branch, or a sitemap robots.txt names that is gone. A site’s first run never alerts — there is nothing to compare it with.

Keyword opportunities

With Search Console or Bing linked, a site's Search tab shows Keyword opportunities: what to write and what to improve, read from the site's own last 28 reported days (and the 28 before, for trends). It is deterministic and free — no paid keyword tool, no AI guesswork — and the same data is behind hoststack seo keywords <domain>, the SDK's keywordOpportunities and the get_keyword_opportunities MCP tool.

GroupWhat it findsWhat to do
Blog post ideasGroups of related searches (same words after stopwords and light stemming, Danish, English and German) where only the homepage or a general page shows, the page never names the words, or it sits below position 10. Questions, how-tos, comparisons and "best"/price searches weigh more.Write the post: each idea has a target keyword, the searches behind it, where the site ranks today, a working title and an outline taken from the real questions.
Almost on page oneSearches where a page averages position 8–20 with 20+ impressions.Strengthen that page: the missing words in its title and H1, a section that answers the search, internal links.
Low click rateTop-5 positions clicked at under half the rate this site normally gets there. The expected rate is calibrated from the site's own data, blended with a default curve where it has little.Rewrite the title and meta description.
Competing pagesOne search whose impressions are split between two or more pages.Pick one page to own it; merge or differentiate the others and link them to it.
RisingSearches whose impressions at least doubled (or appeared) against the previous 28 days.Make sure the page that ranks deserves it.

Left out on purpose: site:-style operator searches, searches with the site's own name, names of other sites (a search for othersite.dk), and any search under 10 impressions (5 inside an idea's group), so a single person's search never turns up in a list or a task. Google rows carry the page, Bing's only the search, so Bing adds to ideas and trends but positions are Google's. The newest SEO audit supplies the page titles; without one, only the URL is checked.

Keyword research

For topics the site does not rank for yet, Keyword research (the same card, --seed on the CLI, or research_keywords) expands a seed — or, without one, the site's own best searches — from three free sources, plus Google Ads when the team has connected it, and marks each phrase as not ranking, page 2+ or page one for the site:

  • Bing Webmaster Tools keyword data, read with the team's saved Bing key: related phrases and their impressions over the last 30 days in the site's market (.dk → Danish in Denmark, otherwise English in the US; overridable). These are Bing impressions, a relative size — never Google search volume. Bing reports nothing below a volume threshold, so most small Danish phrases have no Bing figure at all: that shows as null (not measured), never as 0.
  • Google and Bing autocomplete, with question and comparison words around the seed (how/what/why/best/vs, hvordan/hvad/hvorfor/bedste/pris). Autocomplete says people type a phrase, not how often. These endpoints are unofficial, so HostStack asks them politely — one request at a time per engine, a named user agent, a pause after any refusal — and a failure only means fewer suggestions.
  • Google Keyword Planner, optional, through the team's own Google Ads account: Google's monthly searches, the top-of-page bid range (what advertisers pay per click) and Keyword Planner's own ideas for the seed. From them, paidValue = searches × the CTR at position 3 × the middle bid: what ranking at #3 would cost a month in ads. Keywords, briefs, striking-distance queries and content ideas are ranked by it when it is there. An account without ad spend only gets ranges (100–1K), and they stay ranges. A team admin connects it with bun scripts/google-ads-connect.ts --customer 123-456-7890 on a dev box (it needs a developer token with Basic access); without it everything works as before and sources.googleAds says no_connection.

Answers are cached for two to four weeks and shared, and each request has a small budget of fresh lookups, so a repeat is instant and a new topic takes up to ~20 seconds. Phrases that only share one word with the seed and bring in words the site never uses (a PaaS seed's freight railways) are dropped, as are login, app and other navigational phrases. The gaps come back as briefs, like the ideas above. HostStack never scrapes search result pages.

Auto-tasks

Every morning the analytics checks look at each site's last 30 days and file what they find in the project's Development → Tasks, as ideas. Nothing runs on its own: a task is a written-up finding for you, or your agent, to pick up. A site HostStack serves files into its service's project, pinned to the dev box when there is one. A site with no service files into the project you choose on the site's Auto-tasks card, or the team's dev home.

CheckFiles a task whenTask
Search cliffsA page lost most of its Google impressions (Search Console linked).Own task
Broken setupEvents are refused, nothing has ever arrived, or events stopped while the service is up.Own task
Event floodsA custom event fires 8 or more times per visit.Weekly review
Admin pages trackedPaths under /admin, /dashboard/admin or /wp-admin get pageviews.Weekly review
Personal data in pathsA path carries an email address, plainly or encoded.Weekly review
Pageview spikesA day's pageviews per visitor run at 10× the site's median day.Weekly review
No conversion eventsA site with 100+ visits a month sends no events, none that look like a conversion, or a *_started with no matching *_completed.Weekly review
Funnel collapseConversion between two steps falls by half or more, week over week.Weekly review
Junk entry pagesVisitors land on lorem-ipsum pages, old .php URLs, or pages that answer 404.Weekly review
Content ideasA site with 500+ search impressions in 28 days has blog post ideas with 30+ impressions behind them (or research ideas Bing can size).Own task, weekly

The weekly checks collect into one task per site per week, Analytics review — example.com — week 42, so a busy week is one task to read and not nine. Each task says what was measured, the exact call to re-check it, and what is already ruled out.

Content ideas files one task a week per site, Analytics — example.com — Content ideas: blog posts worth writing, with the top five briefs ready for an agent to write. While nobody has started it, next week's ideas replace its brief instead of filing another; once it is closed, its ideas are not suggested again for 12 weeks.

A finding is never filed twice while its task is open. While nobody has edited the task, its numbers are refreshed in place; once you or an agent have written into it, new numbers arrive as a note instead. Closing a task keeps its finding quiet for 14 days, and it comes back after that only if it is still happening.

Turn the whole thing or single checks off, and change their thresholds, on the site's Auto-tasks card. From a terminal:

bash
hoststack analytics set example.com --auto-tasks off
hoststack analytics set example.com --disable-checks pageview_spike,funnel_collapse
hoststack analytics set example.com --auto-tasks-project 42

Paths that carry an email address are also rewritten to :token as they arrive, so an unsubscribe or magic link can never put an address in your reports. The check above is there to tell you the link leaks it everywhere else.

From the CLI, SDK or MCP

hoststack analytics add example.com
hoststack analytics snippet example.com       # the script tag to paste
hoststack analytics check example.com         # is it working, and if not, why

hoststack analytics stats example.com --range 30d
hoststack analytics stats --range 12mo        # every site, one table

# Allow a second hostname, and keep raw events for 90 days
hoststack analytics set example.com --allowed-origins example.net --retention 90

hoststack analytics gsc connect --all         # link every site with the access a member lent agents
hoststack analytics gsc connect example.com   # or print a link for the owner to finish
hoststack analytics gsc status example.com    # pending → active
hoststack analytics search example.com --range 30d   # Google Search Console, once linked
hoststack analytics search example.com --page /pricing    # one page: its daily figures and queries
hoststack analytics search example.com --csv queries > queries.csv

hoststack seo                                 # every site's latest SEO audit, one table
hoststack seo audit example.com               # run one now and print what to fix
hoststack seo status example.com              # the latest run, what changed since the one before
hoststack seo keywords example.com            # keyword opportunities and blog-post ideas
hoststack seo keywords example.com --seed "fundament"   # + free keyword research for a topic

hoststack analytics bing key set              # an admin saves the team's Bing key (stdin)
hoststack analytics bing connect --all        # link every site; adds + DNS-verifies the ones Bing lacks
hoststack analytics bing stats example.com    # Bing clicks, queries and pages

hoststack analytics rotate example.com        # new key; the old one works 30 more days
hoststack analytics rm example.com            # deletes the site and all its data

Next steps

Was this page helpful?