=== Elite Link Engine ===
Contributors: theeliteengines
Tags: short links, link shortener, branded links, redirects, click tracking, analytics, link rotator, geo redirect
Requires at least: 5.6
Tested up to: 6.6
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Branded short links on your own domain — with click tracking, country/device analytics, password protection, expiry dates, A/B rotators and CSV export.

== Description ==

**Elite Link Engine** turns your WordPress site into a self-hosted Bitly alternative. Create branded short URLs on your own domain, track clicks, and gate them with passwords or expiry dates — all from your WP admin.

= Why use Elite Link Engine? =

* No third-party service. All clicks stay on your server.
* No ads, no upsells, no monthly fees.
* Works on any WordPress install — no SaaS account required.

= Features =

* Branded short links: `yoursite.com/go/anything`
* Custom slug or auto-generated codes
* **Click tracking** with bot filtering
* **Geographic breakdown** (Cloudflare-aware via `CF-IPCountry`)
* **Device, browser and OS** breakdown
* **Top referrers** report
* **Daily timeline** chart of the last 7–365 days
* **Password protection** for private links
* **Expiry dates** and **maximum click caps**
* **Link rotator** for A/B testing — round-robin or weighted
* **Geo overrides** — send specific countries to specific URLs
* **UTM autotagging** — append `utm_source` / `utm_medium` / `utm_campaign` automatically
* **Bulk CSV export** of every link
* Enable / disable links instantly without deleting them

= URL structure =

The default prefix is `/go/` so a short link looks like `https://yoursite.com/go/promo`. You can change this in **Link Engine → Settings**.

= Privacy =

Visitor IP addresses are never stored in plain text. They are hashed with SHA-256 + your WordPress salt before being saved as a "unique visitor" fingerprint. No personal data is sent to any third-party service.

== Installation ==

1. Upload the `elite-link-engine` folder to `/wp-content/plugins/`, or install via the WordPress plugin admin.
2. Activate **Elite Link Engine** through the **Plugins** menu.
3. Visit **Link Engine → Add New** to create your first short link.

After activation the plugin flushes your permalinks once so the `/go/{code}` rewrite rule is registered.

== Frequently Asked Questions ==

= Will this slow down my site? =

No. The redirect handler runs before the WordPress theme loads and writes a single row per click. Bot traffic can be filtered out from analytics in **Settings**.

= Can I change the `/go/` prefix? =

Yes. Go to **Link Engine → Settings** and set any URL-safe slug. Permalinks are flushed automatically when you save.

= Does it work without Cloudflare? =

Yes. Everything works without Cloudflare; you simply will not see country breakdowns, because country detection requires the `CF-IPCountry` (or compatible edge) header.

= Can I import links from Bitly / Pretty Links? =

Not in this version. CSV import is on the roadmap.

= Are clicks counted from my own admin? =

Bot User-Agents are filtered when "Filter known bots" is enabled (default). Real human clicks from logged-in admins are still recorded.

== Screenshots ==

1. The links dashboard, showing every short link with live click counts.
2. The create / edit screen, with all advanced options.
3. The per-link analytics screen, with timeline + country / device / referrer breakdowns.

== Changelog ==

= 1.0.0 =
* Initial release: short links, click tracking, password / expiry / max-click gates, rotator, geo overrides, UTM autotagging, CSV export, full analytics dashboard.

== Upgrade Notice ==

= 1.0.0 =
First public release.
