=== AttentIQ === Contributors: muscode Tags: ads, ad optimization, attention tracking, heatmap, monetization Requires at least: 5.9 Tested up to: 6.9 Requires PHP: 7.4 Stable tag: 1.2.3 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html See where attention goes. Monetize what matters. == Description == AttentIQ tracks how readers actually engage with your content — measuring attention time per paragraph, scroll depth, and ad slot viewability across desktop and mobile devices. It uses this data to automatically place ads at the exact paragraphs where readers spend the most time, maximizing ad revenue without guesswork. **Free Features** * Attention score per post based on content analysis * Automatic in-content ad placement based on content structure * Header, in-content, and footer ad slot support * Per-post meta box with slot score breakdown * Dashboard overview of all tracked posts * Confidence and decay badges **Pro Features** * Paragraph-level attention heatmap (desktop & mobile) * Device-split attention data — separate mobile and desktop tracking * Device-specific ad placement — place ads at each device's hotspot paragraph * Ad slot viewability tracking — see how long each slot stays in the viewport * Programmatic revenue estimates per slot * Direct sale valuations with CPM multipliers * Dual in-content ad placement for high-attention posts * Mobile-specific ad codes for header, in-content, and footer * Alignment control per ad slot * Scroll depth tracking per device * Zone timing breakdown (header / mid-content / footer zones) **How It Works** 1. AttentIQ tracks how long readers spend on each paragraph using a lightweight JavaScript tracker 2. It calculates slot scores for header, in-content, and footer positions based on attention data and content analysis 3. Ads are automatically inserted at the highest-attention positions 4. The insights page shows a full breakdown of attention timing, heatmaps, slot scores, and revenue estimates per post **Privacy & Data Collection** AttentIQ measures how readers engage with your content — including time spent on each paragraph, scroll depth, device type, and ad slot viewability. This data is stored exclusively in your own WordPress database and is never sent to any external server. No personally identifiable information (name, email, IP address) is collected or stored. To detect unique visits per post, a `localStorage` entry (`attentiq_seen_[post_id]`) is written to the visitor's browser. No cookies are set. Site owners can disable all frontend tracking at any time by adding the following to their theme or a plugin: `add_filter( 'attentiq_enable_tracking', '__return_false' );` AttentIQ also registers suggested text for your site's Privacy Policy page (Appearance → Privacy Policy) via the WordPress privacy API. == Installation == 1. Upload the `attentiq` folder to the `/wp-content/plugins/` directory 2. Activate the plugin through the 'Plugins' menu in WordPress 3. Go to **AttentIQ → Settings** and paste your ad codes for each slot 4. Enable auto ads on individual posts via the AttentIQ meta box in the post editor 5. Visit **AttentIQ → Dashboard** to view attention scores and insights for all your posts == Frequently Asked Questions == = Does AttentIQ work with page builders? = Yes. AttentIQ detects common page builders (Elementor, Divi, Beaver Builder, etc.) and switches to JavaScript-based ad injection automatically. = How long does it take to collect attention data? = AttentIQ starts collecting data immediately after activation. Slot scores become reliable once a post reaches the minimum views threshold (default: 50 views), which you can adjust in Settings. = Does it work on mobile? = Yes. AttentIQ tracks desktop and mobile visits separately (Pro). You can set mobile-specific ad codes for each slot and choose device-specific ad placement mode. = Will it slow down my site? = The tracker script is lightweight, loads asynchronously, and only fires after the reader has been on the page for a few seconds (configurable bounce threshold). It has no impact on page load time. = Is my data shared with anyone? = All attention data is stored in your own WordPress database. No post content or reader data is sent to external servers. See External Services for details on third-party services used in the admin UI. = Can I use AttentIQ with custom post types? = Yes. Go to **AttentIQ → Settings** and select which post types AttentIQ should track and inject ads into. == Revenue Estimates Disclaimer == Revenue figures shown in AttentIQ (programmatic revenue per slot, direct sale estimates, RPM calculations, and monthly forecasts) are **estimates only**. They are calculated using industry-standard benchmarks and, where available, your own tracked viewability and impression data. Actual revenue depends on many factors outside AttentIQ's control — including your ad network's fill rates, seasonal demand, audience geography, advertiser competition, and your specific ad setup. Results will vary and may differ significantly from the figures shown. AttentIQ estimates are intended to help you make informed placement decisions, not to guarantee any particular earnings outcome. == External Services == This plugin connects to the following external services. All connections are admin-only — no data from your site's front-end readers is sent to any of these services. **Google Fonts** (https://fonts.google.com) What it does: Loads the DM Sans and DM Mono typefaces used in the AttentIQ admin UI. When it connects: On every AttentIQ admin page load. Data sent: Your browser's IP address and user-agent are sent to Google's servers as part of a standard font stylesheet request. Google Privacy Policy: https://policies.google.com/privacy == Screenshots == 1. AttentIQ Dashboard — attention scores and slot breakdowns for all posts 2. Post Insights — paragraph heatmap, zone timing, and revenue estimates 3. Ad Code Settings — desktop and mobile ad codes per slot with alignment controls == Changelog == = 1.2.3 = * WordPress.org compliance: admin menu position changed from 25 to 100 — AttentIQ now appears below Settings, outside the core WordPress menu hierarchy. = 1.2.2 = * WordPress.org compliance: removed `is_premium` from all PHP localized script data — the Pro plugin now injects attention-data flags into the frontend JS via `wp_add_inline_script()` only when active. * WordPress.org compliance: removed `$is_pro_locked` slot-locking logic and `attentiq_unlocked_slots` filter — the Second In-Content slot is added entirely by the Pro plugin via `attentiq_slot_definitions`; no slot locking exists in the free plugin. * WordPress.org compliance: setup wizard upgrade blocks (`ob_start()` / `apply_filters()` pattern) replaced with direct `if (!class_exists('AttentIQ_Pro'))` checks — no output buffers left open. * Renamed internal JS flag `is_premium` → `use_attention_data` and variables `isPremium` → `hasAttentionData` throughout admin JS — naming now reflects data availability rather than a license state. = 1.2.1 = * WordPress.org compliance: removed `attentiq_is_pro()` function and all `apply_filters('attentiq_pro_active')` calls — pro plugin detection now uses the standard `class_exists('AttentIQ_Pro')` pattern throughout. * Added `attentiq_upgrade_url()` function — returns the in-admin pricing page URL when the Pro plugin is installed, or the external upgrade page otherwise. All upgrade links now use this function instead of the `ATTENTIQ_UPGRADE_URL` constant directly. * Fixed: "Upgrade to Pro" menu item is now hidden when the Pro plugin is installed, regardless of license status. * Improved: "Upgrade to Pro" menu link now opens in a new tab — implemented via `wp_add_inline_script()` for WordPress.org compliance (no raw inline `