=== Footloom Analytics - Self-Hosted Google Analytics Alternative ===
Contributors: thevisionofhamza
Tags: analytics, statistics, visitors, stats, traffic
Requires at least: 5.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Simple visitor analytics that lives on your own site. See live traffic, every visit, custom events and goals without sending data to anyone.

== Description ==

Footloom gives you clear, useful visitor analytics right inside your WordPress dashboard. All data is stored in your own database. Nothing is sent to an outside analytics service.

It is built to stay light. Tracking requests are answered very early in the WordPress load, before your theme and most plugins run, so even busy sites stay fast. The tracking script is small, loads deferred and never blocks your pages.

= See who is on your site right now =

* **Live count** of visitors online at the top of every screen.
* **Spy** shows what current visitors are doing as it happens, page by page.
* Visitors drop off the live view the moment they close or hide the tab, and come back when they return.

= Follow every visit =

* **Visitor log** lists each visit with landing page, referrer, country, device, pages viewed and time on site.
* **Action log** shows every pageview and event across your site, newest first.
* Open any visit to see its full timeline, or see every visit from the same returning visitor.
* Filter everything by page, landing page, country, device, browser, operating system, referrer, campaign, event or new and returning visitors.

= Reports =

* Visitors, pageviews, visits, bounce rate, pages per visit and average visit time. A bounce is a visit that saw one page and left within 10 seconds.
* Daily chart and a heatmap of your busiest days and hours.
* **Content:** top pages with average time on page, entry pages, exit pages and the query strings used on each page.
* **Not found:** 404 pages with the referrer sending the most traffic to each one, so you know what to fix or redirect.
* **Searches:** what visitors search for on your site, and which searches return nothing.
* **Links:** referrers and outbound link clicks.
* **Campaigns:** UTM source, medium and campaign.
* **Platforms:** devices, browsers, operating systems and screen sizes.
* **Locale:** countries and languages.
* Choose today, yesterday, the last 7 or 30 days, this month or any custom range. Reports follow your site timezone.
* Visit and action times show in your own local time, like 3:42 PM.

= Custom events without code =

Track clicks, form submissions and page visits from the Custom Events screen. Pick a CSS selector or a URL path, choose a label and an optional value, and you are done. Each rule shows how many times it fired in the last 7 days, so you can check it works.

Outbound link clicks and form submissions are tracked automatically.

Developers can send events from JavaScript:

`footloom.track('signup', { label: 'footer form', value: 1 });`

Or add attributes to any element:

`<a href="/pricing.pdf" data-footloom-event="download" data-footloom-label="pricing.pdf">Download</a>`

= Goals =

Set a goal for an event or a page visit, like a signup or a thank you page. Page goals can match an exact path or every page under a path, such as `/blog/*`. The dashboard shows completions and conversion rate for each goal.

= Go links =

Create short links like `yoursite.com/go/summer-sale` from the Redirections screen and share them anywhere, in emails, social posts, ads or QR codes. Footloom counts each click on your server and sends the visitor straight on to the destination. Each link shows its clicks for the last 7 days and all time, with a copy button for the link.

You choose the prefix, so links can start with `/go/`, `/out/` or anything else you like. Bots are not counted.

= Privacy friendly =

* No cookies. A random visitor ID is kept in the browser's local storage.
* IP addresses are used only in memory to look up the country and are never stored.
* No data leaves your server for analytics.
* Visitor countries are off until you turn them on.
* Bots and crawlers are ignored.
* Administrators are not tracked by default, so your own browsing does not change the numbers.
* Choose to keep data forever or delete it automatically after a number of days.

== External services ==

Footloom does not contact any outside service unless you turn on visitor countries.

**DB-IP (country lookup database)**

Off by default. When you turn on "Show visitor countries" in Footloom, then Settings, Footloom uses the free DB-IP Lite database to show which country each visit comes from.

* What it does: downloads the database file from `https://download.db-ip.com/free/` and saves it in your uploads folder. All country lookups then happen on your own server.
* When: only after you turn the setting on, then about once a month while it stays on. Turning it off stops the downloads and deletes the file.
* What is sent: a plain file download request. Like any download, DB-IP can see your server's IP address. No visitor data or site data is sent.
* Service: https://db-ip.com
* Terms and license: https://db-ip.com/db/lite.php (Creative Commons Attribution 4.0)
* Privacy policy: https://db-ip.com/privacy.php

If your site runs behind Cloudflare, Footloom reads the country from the header Cloudflare adds to each request. This needs no download and works with the setting off.

== Other Products ==

Also check out our other WordPress products.

- [BerqWP](https://berqwp.com/) - All-in-One WordPress performance plugin.
- [WP Replai](https://wpreplai.com/) - The skills-powered AI customer support agent that lives inside your site, answering questions, walking visitors through fixes, qualifying leads, and only escalating to your team when it truly should.
- [ElizaWP](https://elizawp.com/) - SEO MCP for AI agents that researches, writes and publishes for WordPress.
- [CanvoWP](https://canvowp.com/) - Completely free Agent-first website builder plugin. No blocks, no bloat.
- [Berq Markdown](https://wordpress.org/plugins/berq-markdown/) - Automatically generate markdown version of web pages for AI agents.
- [Berq Used CSS](https://wordpress.org/plugins/berq-used-css/) - Remove unused CSS automatically.
- [Camouflage Security](https://wordpress.org/plugins/camouflage/) - Static WordPress Firewall and PHP Isolation.
- [Barlapse](https://wordpress.org/plugins/barlapse/) - Fix admin bar overflow issue in WordPress admin panel.
- [Seenli Blocks](https://wordpress.org/plugins/seenli-blocks/) - Conditional display blocks for logged in users & user roles.

== Installation ==

1. In your WordPress admin, go to Plugins, then Add New, and search for Footloom.
2. Click Install Now, then Activate.
3. Open Footloom in the admin menu. Data starts showing as soon as your first visitor arrives.

To install manually, upload the `footloom` folder to `/wp-content/plugins/` and activate it from the Plugins screen.

== Frequently Asked Questions ==

= Does Footloom use cookies? =

No. A random visitor ID is saved in the browser's local storage so returning visitors can be recognized. It contains no personal information.

= Do I need a cookie or consent banner? =

That depends on the laws that apply to your site. If you need to wait for consent before tracking, set `window.footloomConsent = false` before the Footloom script loads, and visitors will not be tracked on that page.

= Are IP addresses stored? =

No. The IP address is only used in memory to look up the visitor's country, then discarded.

= Will it slow down my site? =

Footloom is built to be light. The tracking script loads deferred and sends small background requests. On the server, tracking requests stop before your theme and most of WordPress load, and a typical pageview takes only a few database queries.

= Does it work with caching plugins? =

Yes. Tracking runs in the browser, so cached pages are counted normally.

= Are logged in users tracked? =

Yes, except administrators while the "Don't track administrators" setting is on. Customers, members, editors and other logged in users are always tracked.

= Why do visitors show an unknown country? =

Countries are off by default. Turn on "Show visitor countries" in Footloom, then Settings. The country database then downloads in the background. Visits recorded before it finishes, or from addresses the database does not know, show as unknown. Sites behind Cloudflare get countries without this setting.

= How long is data kept? =

Forever by default. Go to Footloom, then Settings, to delete data older than a number of days. Old data is removed once a day and cannot be recovered.

= Do go links work with any destination? =

Yes. A go link can send visitors to any http or https address. The redirect is temporary (302), so browsers check with your site on every click and each one is counted.

= What happens when I delete the plugin? =

Deleting Footloom from the Plugins screen removes all its database tables, settings and the downloaded country database.

== Screenshots ==

1. Home dashboard with summary numbers, daily chart, top pages and referrers.
2. Visitor log with filters.
3. Content report with views, visitors and average time for each page.
4. Custom events screen.

== Changelog ==

= 1.1.1 =

* Improved: Bounce rate now counts only visits that saw one page and left within 10 seconds.

= 1.1.0 =

* New: Redirections screen. Create go links that count clicks and send visitors on to an external URL.
* New: Choose your own go link prefix.
* Improved: Visit and action times now show in your own local time with AM and PM.
* Improved: Data retention and uninstall also remove go link click data.

= 1.0.1 =

* First release.

== Credits ==

* IP geolocation by [DB-IP](https://db-ip.com), licensed under Creative Commons Attribution 4.0.
* Charts by [Chart.js](https://www.chartjs.org) (MIT license). Source: https://github.com/chartjs/Chart.js
* [MaxMind DB Reader](https://github.com/maxmind/MaxMind-DB-Reader-php) (Apache 2.0 license).
