=== ConvertNow Analytics ===
Contributors: prateekzare
Donate link: https://paypal.me/prateekzare16
Tags: analytics, statistics, dashboard, cookieless analytics, google analytics alternative
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Full site analytics computed in your own database. Visitors, goals, funnels, journeys, retention, cohorts and more. Cookieless, self hosted, no paywall.

== Description ==

ConvertNow is a complete analytics platform for WordPress, built to run entirely on your own server. Visitors, pages, referrers, campaigns, countries, devices, read depth, time on page, goals, funnels, journeys, retention, cohorts and segments: all of it computed in your own database, with no account, no key and no subscription.

Most analytics plugins hand you a single traffic chart and stop. ConvertNow gives you the full toolkit a serious site needs to understand its audience and improve against it, without shipping a single byte of visitor data off your server.

**What it records**

* Visitors, visits, views, views per visit
* Real bounce rate and real time on page, measured from an engagement beacon rather than guessed from timestamps
* Top pages, entry pages, exit pages
* Referrers, traffic channels and UTM campaigns
* Browsers, operating systems, devices, screen sizes
* Countries and languages
* Read depth and engaged time per page, so you can see what actually gets read
* A weekday by hour heatmap of when people show up
* A world map of where your visitors are
* A live counter of who is on the site right now
* Filters: click any value to recalculate the whole dashboard against it

**The report screens**

The Stats screen carries a sidebar of reports, each answering one question and each opening on the same page rather than loading a new admin screen.

* Pages: Top Landing Pages, Fastest-Growing Pages, Today, Exit Pages
* Referrers: Search Engine Traffic, Social Media Traffic, Fastest-Growing Referrers, Last 7 Days, Channels, All Referrers
* Campaigns: UTM Sources, UTM Mediums, UTM Campaigns, Fastest-Growing Campaigns
* Geographic: Countries with the world map, Continents, Languages, Fastest-Growing Countries
* Devices: Browsers, OS, Devices, Screens
* Editorial: Authors, Fastest-Growing Authors, Blog Posts, Content Types, for sites that publish under multiple bylines
* Growth Tracking: every headline number against the previous period, with the biggest movers behind them

Each group opens with its own **at a glance** screen: the whole of Pages, or Referrers, or Campaigns, or Geographic, or Devices, or Editorial compressed onto one page, with a link from every panel through to the full report.

Charts are hand-drawn SVG throughout: a trend area, a stacked area for share over time, a ring for part to whole, diverging bars for gains and losses, a world map and a weekday-by-hour heatmap. Referrers, browsers and operating systems carry their own colours and marks, drawn in the plugin, so you can pick one out of a list without reading it. Nothing is fetched to do that: no favicon lookup, no logo service, no request to the referring site.

Every chart on every screen exports as a PNG or a JPG from a button in its own header. The image is the same SVG the screen drew, written to a file, so it comes out sharp rather than as a screenshot. No upload, no library, nothing leaves your server.

Every one of them reads the same nightly summaries the overview does, so the cost is flat: a twelve month report runs the same handful of queries as a seven day one, and each is cached for a minute.

**Behaviour and audience**

* Goals: mark a page as a result, optionally only when a visitor also read far enough or stayed long enough, and see how many visits reached it
* Funnels: an ordered route through the site, with the drop-off at every step. Order is enforced, so a visit only counts at a step if it got there after the step before it
* Journeys: the routes people actually take, and the single hops that tell you where a given page sends them next
* Retention: how a page holds its traffic over the days after it first lands, plus how often a visit is a return within the same day
* Segments: save a set of filters and apply it to every report with one click
* Cohorts: group visitors by how they arrived, what they used or where they landed, and compare them on how deeply they read
* Export: take the selected period out as CSV, TSV, JSON or NDJSON, one row per visit, per pageview or per day, with the filters on screen already applied

Goals, funnels and segments are defined on the screens that show them, not buried in settings. Each editor offers your own pages as you type and a set of starting points for the shapes that come up most often, so a goal takes about fifteen seconds to create and you can see immediately whether it matched anything.

These reports read the raw pageview table rather than the daily summaries, so they see as far back as your raw retention setting keeps. The Export screen's daily grain reads the summaries instead, so it reaches back further.

A note on Retention and Cohorts: ConvertNow identifies a visitor with a hash that is re-salted every day, so nobody can be followed from one day to the next. That is deliberate, and it means "did these visitors come back next week" is a question this data cannot answer. Rather than show a number that looks like retention and is not, both reports answer the version the data does support: how content holds its traffic, and how groups inside one period compare.

**Built for publishers too**

If your site runs on more than one byline, a magazine, a news site or anything with a masthead, ConvertNow has a dedicated Editorial section on top of everything above: traffic by author with real display names, Fastest-Growing Authors measured against the previous period, Blog Posts pulled out on their own so the home page and category archives stop drowning out the writing, and Content Types splitting posts from pages, products and archives. It is on by default because the author is recorded on every pageview, but it is one report group among many, not the whole plugin.

**Languages**

The interface ships translated into German, French, Spanish, Dutch and Italian, placeholders and plural forms included. English is the source language.

Translations live in `/languages` as both `.po` and `.mo`, so a wrong word can be corrected in any editor rather than only by whoever compiled it. Anything not yet translated falls back to English rather than showing a blank. New languages are welcome through https://translate.wordpress.org/projects/wp-plugins/convertnow-analytics/

**Why it stays fast**

The tracker is inlined into the footer by default, which means a tracked pageview costs zero extra HTTP requests and roughly 1.5 KB of JavaScript over the wire. Nothing is render blocking and nothing loads from a CDN.

On the server, raw hits are summarised into small daily tables every hour. The dashboard reads summaries for completed days and raw rows only for today, so a 12 month view runs the same number of queries as a 24 hour one. Once a day is summarised its raw rows can be deleted, which keeps the database small on shared hosting without losing any history.

The admin screen draws every chart with plain SVG, the world map included. There is no charting library and no mapping library, so the whole dashboard is a few kilobytes of JavaScript instead of a few hundred.

Country lookups ship with the plugin as a pre-compiled table. There is nothing to download and nothing to import, which matters on shared hosting where a long download and a few hundred thousand database writes is exactly the job that trips an I/O limit and returns a 504. A lookup reads one 512 byte block of that file and takes about three microseconds. It never touches the database and never leaves the server.

**Privacy**

* No cookies, no localStorage, no persistent identifier of any kind
* The browser keeps a visit hint in sessionStorage, which dies with the tab. The server decides what counts as one visit, and it does so from the daily hash alone
* Visitors are counted with a one way SHA256 hash of IP plus user agent plus a salt that rotates every UTC day, so the same person cannot be followed from one day to the next
* Raw IP addresses are never written to the database
* Do Not Track is respected when you enable it
* Nothing about your visitors is sent anywhere. Country lookups happen on your own server against a table that ships inside the plugin

ConvertNow is cookieless and self hosted. It does not use cookies and it does not send visitor analytics to an external service. Whether your site needs consent depends on your jurisdiction and your configuration, so check your own obligations.

**No account, no key, no paywall**

Everything described above works the moment you activate the plugin. There is no sign up, no key to paste and no screen held back. Nothing leaves your server unless you ask it to.

**Upcoming features**

The plugin is complete as it stands and nothing here is needed to use it. This is what is being built next, roughly in order.

* **AI assistant traffic as its own channel.** Visits arriving from ChatGPT, Perplexity, Claude, Gemini and Copilot are people, not crawlers, and right now they land in the referral bucket where they are easy to miss. They get their own channel and their own screen, plus a column on the Authors report for sites that publish, so you can see what an assistant is citing rather than just that it sent traffic.
* **Import from your current plugin.** Bring your history across from WP Statistics, Independent Analytics, Burst, Koko Analytics, Statify or Jetpack Stats, so switching does not mean starting from an empty chart.
* **A tracking health check.** Analytics that quietly stop recording are worse than none. A check that tells you the script is loading, the collector is answering and yesterday actually got rolled up, with a warning on the screen when it did not.
* **Per-author email reports.** The weekly summary, scoped to one writer and sent to that writer, for sites where that applies.
* **A live screen.** The online counter, opened out into a real time view of what is being read right now.
* **WP-CLI commands.** `wp cnwa rollup`, `wp cnwa prune`, `wp cnwa export` and the rest, for people who deploy rather than click.
* **WooCommerce revenue by source and by channel.** Which channel, which campaign and which page actually earned money, for sites that sell.
* **Consent plugin integration.** ConvertNow needs no consent banner, but where one is already installed the two should agree with each other rather than argue. Explicit support for the common consent plugins.
* **Network reporting on multisite.** One screen across every site in the network, instead of one dashboard per site.

Requests are welcome and they do move this list. Write to prateekzare@gmail.com.

**Who makes it**

ConvertNow Analytics is written and maintained by Prateek Zare (WordPress.org: prateekzare). Website: https://convertnow.tools. Questions, bug reports and feature requests: prateekzare@gmail.com, or contact@convertnow.tools which reaches the same inbox

== Installation ==

From your dashboard:

1. Go to **Plugins → Add New** and search for **ConvertNow Analytics**.
2. Click Install Now, then Activate.
3. Open **ConvertNow** in the admin menu. Data starts appearing immediately.

Or by hand:

1. Upload the `convertnow-analytics` folder to `/wp-content/plugins/`.
2. Activate it from the Plugins screen.
3. Open **ConvertNow** in the admin menu.

Either way that is it. No key, no account, no configuration. Country data is built in, so the map and the Countries panel fill in on their own. Your own visits are not counted while you are logged in as an administrator or editor, which is why the numbers stay at zero until real traffic arrives.

== Frequently Asked Questions ==

= Do I need an account or a licence key? =

No, and there is nowhere to put one. There is no account, no key, no activation and no paid tier. The plugin contains no code that makes an outbound request, so there is nothing to opt out of either.

= Where do I set up a goal or a funnel? =

On the Goals or Funnels screen itself, under the report. Open the report, expand the editor below it, pick a page from your own site, save. Creating a definition needs the same capability as changing a setting, so a user who can view reports but not manage the site sees the report and no editor.

= Why does Retention not show whether visitors came back next week? =

Because ConvertNow cannot tell. A visitor is identified by a hash that is re-salted every day, on purpose, so the same person is unrecognisable tomorrow. Rather than print a number that looks like week-over-week retention and is not, the report answers what the data actually supports: how a page holds its traffic over the days after it lands, and how often a visit is a return within the same day.

= How far back do the behaviour reports go? =

As far as your raw retention setting keeps pageviews, ninety days by default. Goals, funnels, journeys, retention and cohorts all need the shape of individual visits, and the daily summaries have already rolled that away. Each of those screens says the date it can see back to.

= Does the plugin do anything with post authors? =

If your site publishes under more than one byline, yes: the Editorial section reports traffic by author, alongside every other report group. It is on by default because the author is recorded on every pageview, but sites that do not need it can simply not open that section, it costs nothing extra.

= How does it know who wrote a post? =

WordPress already does. The tracker resolves each URL to the post behind it and stores the author ID with the pageview, then the report turns IDs back into display names when it draws. Nothing is sent anywhere to work that out.

= Will author reports cover posts published before I installed it? =

Views recorded before you installed it do not exist, so no. Views recorded before version 2.0 carry no content type yet; Settings has a Classify button that resolves them in batches and backfills Authors, Blog Posts and Content Types for that history.

= Does it work with caching plugins? =

Yes. The beacon is client side and posts to a REST endpoint, so a cached HTML page still reports its own view.

= Does it work with a CDN or Cloudflare? =

Yes. Set the visitor IP source in Settings so country lookups and visitor counts use the real client address instead of the proxy.

= Does it support IPv6? =

Yes. Country lookups cover IPv4 and IPv6.

= Does the country lookup add load to my server? =

Almost none. The table ships with the plugin, so there is no download and no import. A lookup reads one small block of a file, about three microseconds, with no database query and no network request. Results are reused within a request.

= How accurate is the country data? =

It resolves IPv4 to /24 and IPv6 to /48, which is right for about 98% of addresses when checked against the full DB-IP dataset. That is a deliberate trade: a coarser table means a much smaller file and a much cheaper lookup, and it is more than enough to see where an audience is.

= Why do my visitor counts differ from other analytics tools? =

ConvertNow filters bots aggressively and counts a visitor as unique within a single day. Tools that use persistent cookies count differently. Neither number is wrong, they measure different things.

= A content blocker is blocking the endpoint. =

Rename the endpoint in Settings. The tracker picks up the new name automatically.

= Can I track a static page hosted elsewhere? =

Yes. Settings has a snippet. Add the other domain to the allowed domains list first.

= Can I filter the dashboard? =

Yes. Click any row label in a breakdown panel and everything recalculates against that value. Filters stack and combine with AND. Because the daily summaries store each dimension separately, a filtered view reads raw rows, so it reaches back as far as your raw retention setting allows. The filter bar tells you that date.

= Is the trend line a forecast? =

No. It is a least squares fit through the period you are viewing, continued a short way past the end. It knows nothing about seasonality, campaigns or what you publish next. Treat it as direction of travel.

= Does it track clicks? =

No. ConvertNow deliberately records pageviews and engagement only, which keeps the database small and the dashboard readable.

= Where is my data stored? =

In your own WordPress database, in four tables prefixed `cnwa_`. Deleting the plugin removes all of them. The country lookup table is a read only file inside the plugin folder and holds nothing about your visitors.

**Clicks, downloads and searches, when you want them**

Off by default, and honest about why. A page view writes one database row per page; a click writes one per interaction, so an events table grows with how much people do on your site rather than with how many of them turn up. Nothing is collected until you choose it, one type at a time:

* Outbound links, with the destination and the domain
* File downloads, matched by extension
* Email and phone links
* Anything you name with a CSS selector, labelled by `data-cnwa-label` or its own text
* Page views that returned a 404, and the pages that linked to them
* What people typed into your search box

The last two are effectively free: they ride along with a page view that is already being recorded, so they cost one row and no extra request. Broken links and empty searches are usually the fastest wins on any site.

The settings screen tells you what switching this on will cost before you switch it on, using your site's own traffic from the last thirty days and a per-event size measured on a real database rather than guessed. Events have their own retention window, separate from page views, because they are the rows that grow fastest.

**Notes on the chart**

A spike six weeks ago is just a shape unless something tells you what it was. Mark the day you redesigned, sent the newsletter or changed your prices, and the note stays on the chart with the traffic it explains. They are stored in one option row, so there is no table and nothing left behind.

**A weekly email**

Last week against the week before, your five most read pages and five biggest sources, in an email you can read in fifteen seconds. It comes from your own site, contains no tracking pixel, and reads from the daily summaries, so it costs the same whether you had a hundred visitors or a million. Off until you ask for it, and there is a button to send one now and find out whether email leaves your site at all.

== Screenshots ==

1. Overview Dashboard
2. Editorial at a Glance
3. Geographic at a Glance
4. Devices at a Glance
5. Funnels
6. Retention
7. Dark Mode Overview
8. Analytics Settings
9. Admin Dashboard

**A read-only dashboard on a link**

For a client, or a colleague, who should see the numbers and does not need a WordPress account. Off until you switch it on, and issued as a single link you can withdraw at any time.

Whoever holds the link sees exactly what a viewer sees and can change nothing: no goals, no funnels, no segments, no annotations, no export, no settings. That is not a separate read-only mode that could drift from the real one. The link widens one permission callback, which covers the five read routes and nothing else, and every write already carries its own capability check that the link cannot satisfy.

Only a one way hash of the key is stored, so a database dump does not hand over a working link. The consequence is that the address is shown once, when it is created, and cannot be recovered afterwards. Lose it and you generate a new one, which withdraws the old one. Keys are 128 bits, compared in constant time, and an address that keeps guessing is locked out for a quarter of an hour. The page sends noindex and no-store, so a shared link cannot end up in a search index or a shared cache.

**What this plugin will not do**

Three things get asked for often, and are absent on purpose rather than pending.

*Retention that follows a person across days.* Saying the same visitor returned on Thursday and again on Sunday requires an identifier that survives from Thursday to Sunday. That is the thing this plugin refuses to keep: the visitor hash is re-salted daily, so nobody can be joined across midnight. You can have cross-day retention or you can have that guarantee, not both. Retention here measures how a page holds its traffic over the days after it lands, and how often a visit is a return within the same day.

*Session replay and heatmaps.* Replay records a person: their pointer, their scrolling, their typing, and whatever was on screen at the time. It captures things nobody intended to record, and it costs a great deal of storage per visit. There is no code here that can record it.

*AI insights.* Sending your numbers to a model means sending them off your server, which every other claim in this plugin rests on not doing. What you get instead is the previous-period comparison, the growth reports and a full export, so the reading of the data stays with whoever knows the site.

== External services ==

ConvertNow uses no external service, and it has no optional one either.

Tracking, reporting, goals, funnels, journeys, retention, segments, cohorts, country lookups and exports all run on your own server against your own database. The plugin makes no outbound HTTP request of any kind, schedules no call home, and has no activation, licence or telemetry endpoint. Nothing about your site or your visitors ever leaves it.

The country lookup tables ship inside the plugin as plain text files and are read from disk. There is nothing to download and nothing to import.

== Other Notes ==

**Support**

Email contact@convertnow.tools or visit https://convertnow.tools.

**Bundled data**

IP Geolocation by DB-IP (https://db-ip.com), used under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).

Country lookups read two plain text tables built from the DB-IP IP to Country Lite database: `assets/data/geo-ipv4.csv` and `assets/data/geo-ipv6.csv`. Every line is one boundary, written as an uppercase hex address prefix and an ISO 3166-1 alpha-2 country code, so both files can be opened and read in any text editor. The world map outlines are plain JSON path data at `assets/data/world.json`. Nothing in the plugin is compiled, minified or obfuscated.

== Changelog ==

= 1.0.0 =

First public release on WordPress.org.

* **A complete analytics core.** Visitors, visits, views, real bounce rate and real time on page from an engagement beacon, top and exit pages, referrers, channels, UTM campaigns, countries, languages, browsers, systems, devices and screen sizes, each on its own screen and in an at a glance summary.
* **Behaviour and audience tools.** Goals, funnels, journeys, retention, segments and cohorts, all defined and edited from the report they feed.
* **Editorial reporting for sites that publish.** Traffic by author with real display names, Fastest-Growing Authors, Blog Posts on a screen of their own, and Content Types splitting posts from pages, products and archives.
* **Cookieless by design.** No cookie, no browser storage, no device fingerprint. Visitors are counted with a daily rotating hash that cannot be reversed or carried across days, and no IP address is ever written to the database.
* **Self hosted, end to end.** Every figure is computed in your own tables. Nothing is sent anywhere, there is no account, no API key and no paid tier.
* Country lookup runs locally against a bundled DB-IP table. No lookup service is contacted.
* Daily rollups keep the reports fast on large sites, with configurable retention for raw hits, events and summaries.
* Weekly email digest, a dashboard widget, a read only shareable dashboard link, CSV export and annotations.
* Every table and column name binds through `$wpdb->prepare()` with the `%i` placeholder, which is why WordPress 6.2 is the minimum. Nothing the plugin runs is assembled from a string.
* Report caching is keyed by permission scope, so a payload built for an administrator can never be served to a shared dashboard link.

== Upgrade Notice ==

= 1.0.0 =
First public release.
