=== SSP Click Counter === Contributors: stupidsimpleplugins.com, jimmyredline80 Donate link: https://www.stupidsimpleplugins.com/ Tags: clicks, analytics, selectors, admin, tracking Requires at least: 6.0 Tested up to: 6.8 Requires PHP: 7.4 Stable tag: 1.0.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Track clicks on CSS selectors. Add, edit, delete selectors, and reset counts. Includes an in-plugin showcase tab with optional external links. == Description == **SSP Click Counter** lets you track clicks anywhere on your site by listing CSS selectors in a simple admin table. No coding required. You can add, edit, delete selectors, sort rows, and reset counts per selector or all at once. The plugin uses a tiny script with event delegation and sends lightweight AJAX requests to record clicks. Counts are stored as WordPress options. A second admin tab (“Provided Free by StupidSimplePlugins.com”) includes a **text-only** showcase of other plugins from Stupid Simple Plugins. It contains no external scripts or automatic remote requests. Links in this section are standard hyperlinks that open the StupidSimplePlugins.com website when clicked by the user. No data is transmitted automatically. = Key points = * Add any number of CSS selectors to track (e.g., `.buy-now`, `#signup`, `a[href*="checkout"]`). * Inline, sortable admin table with Edit/Delete actions. * Reset counts per row or reset all. * Nonces on all admin actions and AJAX for security. * Front-end script loads only when you have selectors saved. * Internationalization ready (`/languages`), GPL-2.0-or-later. * No external updaters. No remote calls. No front-end UI output. = How it works = 1. You list CSS selectors in the admin. 2. A small inline script listens for clicks via event delegation. 3. When a click matches a selector, a background AJAX request increments that selector’s count. 4. View or reset counts in the admin table. == Features == * Track clicks by **CSS selector** * **Sortable** rows (drag to reorder) * **Edit** in place * **Delete** rows instantly * **Reset** per row or **Reset All** * Minimal, dependency-free front-end (uses native `fetch`) * Admin-only **text-only showcase** tab * Works with caching/CDNs * Translation ready == Installation == 1. Upload the plugin folder to: `wp-content/plugins/ssp-click-counter/` 2. Ensure the main file is: `wp-content/plugins/ssp-click-counter/click-counter.php` 3. Activate **SSP Click Counter** from **Plugins → Installed Plugins**. 4. Go to **SSP Click Counter** in the left admin menu. 5. Add your CSS selectors, optionally give each a name, and click **Save All Changes**. == Frequently Asked Questions == = Does this output anything on the front end? = No. It only enqueues a tiny inline script to listen for clicks when you have selectors saved. = Will this slow down my site? = The listener uses event delegation on `document.body` and a short inline script. Each matched click sends a small AJAX request. For most sites this is negligible. = Can I track links in menus, buttons, or custom elements? = Yes. Provide any valid CSS selector that matches the element you want to track. = Does it collect personal data? = No. It records only the count per selector. No IPs, no user IDs, and no URLs are stored. = Can I export counts? = Counts are saved in the WordPress options table. You can export via a database tool or a small custom snippet. = Why is the admin menu labeled “SSP Click Counter”? = That’s the menu label only. The plugin’s official name remains **SSP Click Counter**. == Screenshots == 1. **Click Counter tab** – add/edit/delete selectors, view counts, reset per row. 2. **Provided Free by StupidSimplePlugins.com tab** – text-only showcase (no scripts, no automatic external requests). == External Services == This plugin contains an optional **About/Showcase tab** that includes standard links to pages on **stupidsimpleplugins.com**. - No data is transmitted automatically. - No background connections are made by the plugin. - When the user clicks a link, the browser opens the destination page on StupidSimplePlugins.com. - These links are provided for additional information and related products. For transparency, here are the relevant policies for that website: - Terms of Service: https://www.stupidsimpleplugins.com/terms-and-conditions/ - Privacy Policy: https://www.stupidsimpleplugins.com/privacy-policy/ == Privacy == This plugin does not log personal data, does not set cookies, and does not transmit data to third parties. All click counts are stored locally in the WordPress database as options. == Changelog == = 1.0.0 = * Initial release. * Click tracking by CSS selector with AJAX. * Admin table with add/edit/delete, sortable rows, per-row and global reset. * Text-only showcase tab with external link disclosure. * No external updater; translation ready. == Upgrade Notice == = 1.0.0 = Initial public release.