To count article views without cookies, send the page path and CMS entry ID when a visitor views the page. With genko.me, register the allowed domain and add PageView in React or call sendPageView in other browser integrations. Views of the same page from the same device are counted once per 30-minute window, so the result is not a count of every reload.
This article is written by the genko.me team. It describes genko.me as checked in October 2026 and briefly compares its editorial view counts with GA4, Cloudflare Web Analytics, and Plausible.
What can cookieless article view counts tell me?
genko's PV feature helps editors see which articles people read without leaving the CMS. It stores daily counts by page path and entry ID. It is a deliberately focused tool for content feedback rather than a system for following an individual visitor over time.
Question | genko PV support |
|---|---|
How many views does a page path receive? | Path-level counts |
How many views does a CMS entry receive? | Entry-level counts |
Which articles have the most views? | Sort by cumulative views |
Where did visitors come from? | Referrer information is not stored |
Which countries or devices are involved? | These dimensions are not stored |
Does a particular person return over time? | Persistent visitor tracking is not provided |
An entry ID is useful when article URLs change: sending the same ID still associates the view with that article. However, IDs are shared aggregation keys within a workspace. Entries with the same ID in different APIs share their count, so use different IDs when those entries must be measured separately.
1. Register the domain you want to measure
Open PV in the workspace and register the domains that may send views. An owner or maintainer manages this setting. Subdomains need separate registrations; unregistered domains and localhost are not counted.
Register the domain where the website is actually served.
Add the browser-side measurement integration.
Open the registered website in a normal browser.
Check the CMS for incoming data and the resulting graph.
View submission does not require a delivery API key. Fetching published articles and sending view measurements use separate mechanisms. Do not add a content API key to the browser just for analytics.
Bots and automated browsers are excluded. A browser driven by an end-to-end test may therefore not increment the graph, even when the integration is correct. Use a registered domain and a normal browsing session for the acceptance check.
2. Add PageView to a Next.js layout
For Next.js App Router, import from @genko-me/react/next. Install the packages, then put one path-tracking component in app/layout.tsx:
npm install @genko-me/react @genko-me/coreimport type { ReactNode } from 'react';import { PageView } from '@genko-me/react/next';
export default function RootLayout({ children }: { children: ReactNode }) { return ( <html lang="en"> <body> {children} <PageView workspace="your-workspace" /> </body> </html> );}Replace your-workspace with your workspace slug. PageView renders no visible UI. The Next.js implementation follows usePathname(), which lets it submit views during App Router navigation as well as on a full page load.
Add entry tracking on an article page using the ID of the entry you actually fetched. The following article helper is intended for a Server Component context:
import { PageView, ViewCount } from '@genko-me/react/next';
export function ArticleViews({ entry }: { entry: { id: string } }) { return ( <> <PageView workspace="your-workspace" entryId={entry.id} /> <ViewCount workspace="your-workspace" entryId={entry.id} /> </> );}The layout submission counts the path. The submission with entryId increments the article count rather than counting the page path again. ViewCount only displays the cumulative number; it never records a view by itself.
For React outside Next.js, import from @genko-me/react. If you use a custom client router, pass the current path through the path prop and update it when navigation occurs. Do not assume every router emits the same browser events.
How do I track views in plain JavaScript?
Use the browser helper when React is not part of the website. Place this in a browser entry file handled by a bundler that resolves npm packages. Calling it in a Node.js server process does not record a browser view.
import { sendPageView } from '@genko-me/core/browser';
sendPageView({ workspace: 'your-workspace', path: location.pathname });sendPageView({ workspace: 'your-workspace', entryId: 'abcDEF123456' });The first call records the page path. The second records an article and should only appear on an article page, with the placeholder replaced by its actual entry ID. On a non-article page, the first call is sufficient.
For a single-page application, submit after route changes as well as on initial display. As of October 2026, dedicated PV components for Vue, Svelte, and Web Components are not available; the JavaScript helper is the documented workaround.
When adding tracking to an existing static HTML news section, make sure the package-loading method matches the rest of the site. A bare npm import is not automatically resolved by an ordinary HTML script without bundling or an appropriate import map.
How do I display an article's view count?
Use ViewCount in React when you only need a displayed number. You can also retrieve counts yourself with fetchViewCounts, which works on the server too:
import { fetchViewCounts } from '@genko-me/core';
const counts = await fetchViewCounts({ workspace: 'your-workspace', entryIds: ['abcDEF123456'], paths: ['/blog/hello'],});console.log(counts.entries.abcDEF123456, counts.paths['/blog/hello']);This function throws on retrieval failure, so handle that failure in the surrounding display code. Do not let an unavailable counter make the article unreadable. The public cumulative totals can be cached for up to approximately five minutes, so the displayed number may lag behind a recorded view.
When checking a counter, distinguish a delayed display from deduplication. Repeatedly refreshing within 30 minutes will not give you a new count every time, and immediately refetching a cached total may still show the earlier value.
How do I show popular articles by view count?
The delivery list accepts orders: '-views' for highest cumulative count first. orders: 'views' sorts in the opposite direction, and unmeasured articles are treated as zero. Here is a server-side SDK example including the client setup:
import { createGenko, listApi } from '@genko-me/sdk';
const genko = createGenko({ workspace: 'your-workspace', apiKey: process.env.GENKO_API_KEY!, apis: { blog: listApi() },});const popular = await genko.apis.blog.list({ orders: '-views', limit: 4 });console.log(popular.contents);Install @genko-me/sdk and configure a delivery API key on the server before using that example. React's List also accepts orders="-views".
Label this list as popular overall, not “popular this week.” The ordering is based on cumulative counts. If you need a time-window ranking, the fetching reference documents methods such as views({ ids, days }); define the candidate entries and ranking window separately.
That distinction prevents misleading editorial feedback. A long-running article has had more time to accumulate views than a new announcement. A cumulative list can help readers discover established content, but it is not automatically a fair comparison of recent performance.
What information does genko store?
According to the PV specification, genko derives a salted hash from the IP address and User-Agent, with the salt changing daily. It uses that hash temporarily for deduplication and does not store the raw IP address or User-Agent.
The saved view data consists of daily counts by path and article. Query strings and URL fragments are removed; repeated and trailing slashes are normalized. genko does not store cookies, referrers, devices, countries, or visitor tracking information. Bots and browsers exposing navigator.webdriver are excluded, and IP-based rate limits also apply.
Paths are still transmitted. Avoid designing URLs that contain people's names or other sensitive values simply because query parameters are removed. Describe the actual path submission to genko in your site's privacy information so the explanation matches the integration.
Should I use genko, GA4, Cloudflare, or Plausible?
Choose based on the question you need to answer, not just whether a product has a page-view graph. The following comparison was checked against official documentation on October 20, 2026.
Tool | Relevant behavior | Good use case |
|---|---|---|
genko PV | Cookieless daily path and entry counts | Editors checking article readership inside the CMS |
GA4 | Standard tags distinguish users and sessions with first-party cookies; sending data without setting cookies is possible | Analysis designed around users and sessions |
Cloudflare Web Analytics | No cookies or localStorage for measurement; page and performance information | Understanding site-wide page experience |
Plausible | No cookies; also collects referrer, country, and browser information | Site analytics that include traffic sources |
Google's documentation explicitly says cookies are not required merely to transmit analytics data. It would be inaccurate to say GA4 cannot send anything without them. Cloudflare describes measurement without client-side state, while Plausible documents daily identifiers and a broader set of analytics dimensions.
The other tools are stronger choices when you need dimensions genko intentionally does not retain. You can also use genko for editorial feedback alongside a separate analytics tool for a different purpose. Expect their totals to differ because collection, bot filtering, and duplicate handling are not identical.
As of October 2026, genko PV measurement is currently free. Future free allowances and usage pricing are undecided. For the CMS itself, check the plan documentation and official website.
FAQ
Why does refreshing the page not increase the count?
The same device viewing the same page is counted once per 30 minutes. Also check the display cache, allowed domain, and automated-browser exclusions.
Can I test view counting on localhost?
Localhost views are not recorded. Open a registered domain in a normal browser and inspect the incoming data in the workspace.
Does ViewCount record a view automatically?
No. It only displays a total. Use PageView or sendPageView to submit the measurement.
Should genko PV match GA4 exactly?
No. Their measurement definitions and filtering differ. Compare trends within the same tool and definition rather than assuming interchangeable totals.
Sources
Checked October 20, 2026.
