=== LinkPulse - Affiliate Link Checker & Revenue Intelligence ===
Contributors: joost321
Tags: affiliate links, broken links, link checker, affiliate marketing, link monitoring
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 3.8.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Find broken affiliate links before they cost you money. Built for publishers and affiliate marketers who depend on outbound links for revenue.

== Description ==

Every broken affiliate link is a visitor who wanted to buy but hit a dead end. You lose the commission. The visitor loses trust. And you never know it happened.

**LinkPulse finds these broken links before your readers do.**

Most link checkers treat all links the same. LinkPulse does not. It was built specifically for publishers and affiliate marketers who depend on outbound links for revenue. It knows the difference between a broken navigation link and a dead Amazon product page, and it tells you which one is costing you money.

= How it works =

1. **Scan** your published content (posts, pages, custom post types)
2. **Detect** which links are affiliate links and which network they belong to
3. **Check** every outbound link for HTTP errors, timeouts, and redirects
4. **Alert** you when links die, with revenue impact estimates
5. **Fix** broken links from inside the plugin with the optional AI assistant (Pro)

= Supported affiliate networks =

LinkPulse automatically recognizes links from 20+ affiliate networks:

* Amazon (all regional stores including US, UK, DE, NL, FR, IT, ES, and more)
* Bol.com (NL and BE)
* Awin
* ShareASale
* CJ Affiliate (Commission Junction)
* Daisycon
* Tradedoubler
* TradeTracker
* Webgains
* Impact
* Partnerize
* Rakuten (LinkSynergy)
* Admitad
* ClickBank
* Digistore24
* Coolblue (NL and BE)

Links are also detected by affiliate query parameters (tag, ref, aff, subid, clickref, and others), so even networks not in the list above are caught.

= Free features =

* Scan up to 500 outbound links
* Automatic affiliate link detection and network identification
* HTTP status checking with HEAD and GET fallback
* Dashboard with status overview (alive, dead, redirected)
* Filter and search across all tracked links
* Revenue-at-risk alerts for dead affiliate links
* Context extraction (see the surrounding text for each link)
* One-click re-check for individual links
* REST API endpoint to check any URL
* Choose which post types to scan
* No-credit-card 7-day Pro trial (start from inside the plugin)

= Pro features =

* **Unlimited links** -- no cap on how many links you monitor
* **AI assistant** -- chat inside wp-admin to triage broken links, find replacements, and apply fixes
* **Daily AI analyzer** -- a scheduled scan that flags newly broken links and proposes fixes
* **Revenue tracking via WeCanTrack** -- see commissions per link and per article, so you know which broken links cost you the most
* **Articles-at-risk alerts** -- spot articles whose revenue is dropping because of dead links
* **Scheduled scans** -- daily, weekly, or monthly automatic scans via WP-Cron
* **Email alerts** -- get notified immediately, daily, or weekly when links break
* **Auto-fix redirects** -- automatically update 301/302/307/308 redirects to their target URL
* **CSV export** -- download your full link inventory with filters
* **Alternative suggestions** -- when an affiliate link dies, get a search URL to find the product on the same merchant
* **Multi-site dashboard** -- manage up to 5 sites (Pro) or 25 sites (Agency) from one cloud workspace
* **MCP server access** -- query your LinkPulse data from Claude, Copilot, and other AI tools
* **REST API access** -- integrate LinkPulse with your own automation

Pro is €29 per month (5 sites) or €99 per month for Agency (25 sites). A €299/year Founder rate is available for the first 100 publishers. See [linkpulse.dev/pricing](https://linkpulse.dev/pricing/) for details.

= REST API =

LinkPulse includes a REST API for integration with external tools, automation workflows, and AI writing assistants:

* `GET /wp-json/linkpulse/v1/stats` -- summary statistics
* `GET /wp-json/linkpulse/v1/links` -- list links with status, type, and network filters
* `GET /wp-json/linkpulse/v1/check?url=...` -- check any URL (public endpoint, no auth required)

= Built for publishers =

* **Revenue framing** -- dead link counts are paired with estimated revenue at risk
* **Affiliate-first sorting** -- dead affiliate links always surface first
* **Network breakdown** -- see which networks have the most problems
* **Page context** -- see the surrounding text and anchor for every link
* **Clean admin UI** -- no clutter, no ads, no upsell banners polluting your dashboard

== External services ==

LinkPulse is a cloud-backed plugin. To detect affiliate networks, check link status reliably, and run AI-assisted features, the plugin communicates with the LinkPulse cloud service at `api.linkpulse.dev`. Without this service the plugin cannot scan, validate licenses, or use the AI assistant.

= What is sent and when =

* **On scan**: the URLs of outbound links found in your published content are sent to `api.linkpulse.dev` so the cloud scanner can check HTTP status, follow redirects, and classify them by affiliate network. The plugin sends only the URLs themselves and the IDs of the posts/pages that contain them, not the post content.
* **On AI assistant use** (Pro only): your typed prompt and the broken-link context are sent to `api.linkpulse.dev`, which forwards the request to Anthropic's Claude API for analysis. The plugin sends only what you ask about; it does not send full post content.
* **On license validation** (Pro / trial): the plugin sends your license key (or a trial-key request from a "Start trial" click) to `api.linkpulse.dev` to verify the subscription status.
* **On feedback submission** (optional): if you use the built-in feedback widget, the message you type and your email (if you provide one) are sent to `api.linkpulse.dev`.

= Click counting (local, no external service) =

LinkPulse counts how often visitors click the outbound links it monitors, so reports can show real impact ("this dead link received 34 clicks last month") instead of estimates. This counting is fully local: only aggregate numbers (link URL, post, day) are stored in your own WordPress database. No cookies are set, no visitor identifiers, IP addresses, or personal data are stored, and nothing about your visitors is sent to the LinkPulse cloud.

= Service provider =

LinkPulse is operated by 31 Ventures (Netherlands, KvK 81019556).

* Privacy policy: [https://linkpulse.dev/privacy/](https://linkpulse.dev/privacy/)
* Service status and terms: [https://linkpulse.dev](https://linkpulse.dev/)
* AI subprocessor: Anthropic (Claude API), used only for AI assistant and daily analyzer features.

No external requests are made on plugin activation. All cloud calls are triggered by explicit user actions (scanning, entering a license key, starting a trial, using the AI chat, submitting feedback).

== Installation ==

= Manual installation =

1. Download the plugin ZIP from [linkpulse.dev](https://linkpulse.dev/download)
2. In WordPress: go to **Plugins > Add New > Upload Plugin**
3. Choose the ZIP file and click **Install Now**
4. Activate the plugin

= After activation =

1. Go to **LinkPulse** in your admin sidebar
2. Click **Scan My Site** to run your first scan
3. Review the results -- dead links and broken affiliate links are highlighted
4. (Optional) Click **Activate Pro -- 7-day trial** to unlock the AI assistant and revenue tracking without a credit card
5. (Optional) Go to **LinkPulse > Settings** to enter a Pro license key after the trial and configure scheduled scans

== Frequently Asked Questions ==

= Does LinkPulse slow down my site? =

No. LinkPulse only runs scans when you click the scan button or during scheduled background scans (Pro). It does not add any code to your frontend and does not affect page load times for your visitors.

= What counts toward the 500-link free limit? =

Each unique outbound URL on a published post or page counts as one link. Internal links, anchor links, mailto links, and tel links are not counted. If the same URL appears on multiple pages, it is counted once per page.

= How does affiliate link detection work? =

LinkPulse uses two methods. First, it matches URLs against a database of known affiliate network domains (Amazon, Bol.com, Awin, CJ, Daisycon, and 15+ others). Second, it checks for common affiliate query parameters like tag, ref, aff, subid, and clickref. This catches most affiliate links even from networks not explicitly listed.

= What does auto-fix do exactly? =

When a link returns a 301 or 302 redirect, auto-fix updates the URL in your post content to point directly to the redirect target. This eliminates unnecessary redirect hops, which is better for SEO and faster for visitors. Auto-fix only runs during scheduled scans and only updates redirect links (not dead links).

= Can I scan custom post types? =

Yes. Go to **LinkPulse > Settings** and select which post types to include in scans. Any public post type registered on your site will appear as an option.

= Does LinkPulse work with page builders? =

LinkPulse scans the raw post content stored in your database. Links added through Gutenberg blocks, Classic Editor, Elementor, and most page builders are detected. Links rendered purely through JavaScript or shortcodes that generate URLs dynamically may not be caught.

= Is the REST API authenticated? =

The stats and links endpoints require WordPress admin authentication (manage_options capability). The single URL check endpoint (`/check`) is public and can be used by anyone. Rate limiting is handled by your server configuration.

= Will LinkPulse detect affiliate links from custom shortcodes or plugins like ThirstyAffiliates? =

LinkPulse scans the stored post content. If your affiliate plugin uses shortcodes that output regular `<a>` tags in the content, those links will be detected. If the plugin rewrites URLs on the fly using PHP output filters, the original shortcode URL is what gets scanned.

= What happens if I deactivate or uninstall the plugin? =

Deactivating LinkPulse preserves all your data (tracked links, settings, license key). Uninstalling fully removes all LinkPulse database tables and options from your site. Your posts and their content are never modified by uninstallation -- only LinkPulse's own data is removed.

= Do I need a LinkPulse account to use the free version? =

No account is required for the free version. The plugin sends URLs to `api.linkpulse.dev` for checking and classification, but no signup or login is needed. A license key is only required if you start a Pro trial or subscribe to Pro/Agency.

== Screenshots ==

1. **Welcome screen** -- a single "Scan My Site" call to action with a 7-day Pro trial offer that requires no credit card.
2. **Dashboard** -- the full link inventory with status filters (All, Broken, Warnings, Healthy), a network filter, search, and CSV export (Pro).
3. **AI assistant** -- chat inside wp-admin to triage broken links and apply fixes (Pro).
4. **Settings** -- scanning, alerts, auto-fix, and license controls in a clean two-column layout.
5. **Revenue tab** -- per-link and per-article commission data when WeCanTrack is connected (Pro).

== Changelog ==

= 3.8.0 =
* Click counting: LinkPulse now measures real visitor clicks on monitored links (local, no cookies, no personal data) — reports show measured impact instead of estimates
* New "Clicks 30d" column in the links dashboard; dead links with real clicks are highlighted
* Email alerts now report real measured numbers: actual article revenue (when WeCanTrack is connected) and real click counts — invented revenue estimates removed
* Trial countdown badge in the header so you always know how many Pro trial days remain
* First-scan summary moment after your very first scan
* Friendlier free-plan limit notices, surfaced earlier (60% of cap)

= 3.7.15 =
* Fixes for large-account license validation flow
* Plugin auto-update channel hardening
* Frontend Copilot UI polish

= 3.7.0 =
* Frontend Copilot: inline assistant bubble for guided link fixes
* Product-box recommendations for affiliate replacements
* Anchor-aware insertion in Gutenberg and Classic Editor

= 3.6.0 =
* Redesign engine: AI-assisted page redesign with preview, iterate, apply, discard, and restore
* Apply-verifier prevents partial writes to post content
* New welcome hero and onboarding copy

= 3.5.0 =
* No-credit-card 7-day Pro trial (start from inside the plugin)
* Stripe-trial flow simplified with automatic license activation
* Dual-funnel: linkpulse.dev trial + free wp.org plugin share one codebase

= 3.4.0 =
* WeCanTrack revenue connector: per-link commission data
* Articles-at-risk view: spot articles whose revenue drops because of dead links
* Multi-site cloud dashboard at app.linkpulse.dev

= 3.0.0 =
* Major rewrite. New cloud-backed architecture with `api.linkpulse.dev`.
* Added AI assistant tab inside wp-admin (Pro)
* Added Pro daily analyzer that scans and proposes fixes automatically
* Added MCP server endpoint for AI-tool integrations
* New workspace + site model for managing multiple WordPress sites from one cloud dashboard

= 1.5.0 =
* Settings page redesign: at-a-glance status strip, two-column grid, clearer Pro lock indicators, sticky save bar
* License section moved below feature settings so upgrade value is clearer before activation
* Active-license state now shows a collapsible "Change key" option instead of always displaying the input
* Accessibility: added aria-live on save status, semantic details/summary for advanced options

= 1.4.1 =
* UI polish: toolbar spacing, improved search placeholder text
* Minor copy tweaks on the upgrade CTA

= 1.4.0 =
* Pro checkout flow: direct Stripe Checkout integration from the upgrade panel
* Automatic license activation after returning from Stripe (no manual copy-paste of the key)
* Inline error surface if checkout cannot be started

= 1.3.2 =
* Plugin admin UI redesign with clearer welcome state and link table
* Improved status filter visibility when broken links exist
* Better empty-state handling

= 1.2.0 =
* Expanded affiliate network detection (Impact, Partnerize, Rakuten, Tradedoubler, Webgains)
* REST API: added `/links` endpoint with filtering
* Revenue-at-risk estimation surfaced in dashboard and email alerts

= 1.1.0 =
* Security: added SSRF protection on the public URL check endpoint (blocks private/internal IP ranges)
* Security: license validation cron only runs when a license key is configured
* Fixed version consistency across plugin header and readme

= 1.0.0 =
* Initial release
* Link scanner: extracts all outbound links from published content
* Affiliate detection: recognizes 20+ networks by domain and query parameters
* HTTP checking: HEAD request with GET fallback, redirect detection, timeout handling
* Admin dashboard: stats cards, link table with sorting, filtering, search, and pagination
* Revenue alert: highlights dead affiliate links with estimated revenue impact
* Settings page: scan frequency, email alerts, post types, auto-fix toggle, license key
* Scheduled scans: daily, weekly, or monthly via WP-Cron (Pro)
* Email alerts: immediate, daily digest, or weekly digest (Pro)
* Auto-fix: updates redirect URLs in post content automatically (Pro)
* CSV export: download full link data with filters (Pro)
* REST API: stats, links (with filters), and public URL check endpoints
* Alternative suggestions: search URLs for dead affiliate links on known merchants
* Free tier: up to 500 tracked links with manual scanning

== Upgrade Notice ==

= 3.8.0 =
Real measured numbers everywhere: visitor click counting (privacy-friendly, local) replaces revenue estimates. Plus trial countdown and friendlier limits. Safe to update from any 3.x.

= 3.7.15 =
Plugin auto-update + license-validation hardening. Safe to update from any 3.x.

= 3.5.0 =
No-credit-card 7-day Pro trial: start from inside the plugin and unlock the AI assistant without entering payment details.

= 3.0.0 =
Major rewrite with cloud-backed architecture, AI assistant, daily analyzer, MCP server, and a multi-site dashboard. All settings are preserved; the plugin now communicates with `api.linkpulse.dev` for scans and AI features.

= 1.5.0 =
Redesigned settings page with at-a-glance status, two-column layout, and a cleaner license/upgrade section. No breaking changes -- all settings are preserved.

= 1.0.0 =
First release of LinkPulse. Scan your site for broken affiliate links and start protecting your revenue.
