# Ad Block Ghost — Landing Pages (-=LP=-)

## Overview & Purpose
This folder (`-=LP=-`) contains high-converting, localized landing pages for the **Ad Block Ghost** Google Chrome Extension (`ID: donodhjdnkockalocpljpfahelbfoacc`).

These landing pages serve as acquisition funnels from multiple marketing channels (affiliates, search, display, converters, and streaming referrals). Their core objectives are:
1. Educate visitors on Ad Block Ghost’s ad-blocking and anti-popup capabilities.
2. Maintain compliance with Chrome Web Store and privacy policies.
3. Pass through attribution and tracking parameters (`a`, `c`, `s`, `p`).
4. Guide the visitor to click through to the Chrome Web Store via `re.php`.
5. Detect when the extension has been successfully installed and cleanly redirect the user.

---

## Technical Architecture & Core Mechanisms

### 1. Attribution & Parameter Passing
Incoming traffic lands on pages with query parameters used for attribution and conversion tracking:
- `a` (Affiliate / Network Name): Tracking account or network identifier.
- `c` (Click ID): Unique click / transaction identifier for postback.
- `s` (Sub ID): Placement, sub-publisher, or campaign ID.
- `p` (Payout / Partner Option): Optional parameter for partner settings.
- `lang` / `l`: Explicit language code override (e.g. `es`, `fr`, `de`, `pt-BR`). If not present, client scripts fall back to `navigator.language || navigator.userLanguage`.

### 2. Click Handling & Chrome Web Store Redirection
When users click the main call-to-action (CTA buttons such as `#continue`, `#herobottomtxt`, or Chrome Web Store badges `#cwslink`, `.popcws`):
- The script triggers an action (often `popupcws()` or direct event listener).
- User is directed to the backend attribution router:
  ```text
  https://adblockghost.com/re.php?a=${an}&c=${cid}&s=${sid}&p=${po}
  ```
- `re.php` securely sets attribution cookies across `.adblockghost.com` and redirects to the official Chrome Web Store listing:
  ```text
  https://chromewebstore.google.com/detail/donodhjdnkockalocpljpfahelbfoacc
  ```

### 3. Extension Installation Detection (Liveness Polling)
Each landing page runs a polling loop to check if the extension has been installed:
- Target web-accessible extension resource:
  ```javascript
  const iconCheck = 'chrome-extension://donodhjdnkockalocpljpfahelbfoacc/assets/icon.png';
  ```
- The page periodically calls `fetch(iconCheck, { method: 'GET' })`:
  - Before installation, the browser rejects or returns an error.
  - Upon successful installation from the Web Store, the request succeeds (`response.ok`).
  - The script clears timeouts and redirects the parent page (usually to `https://google.com` or an onboarding/thank-you URL) after ~1000ms.

### 4. Internationalization (i18n)
Landing pages support 30+ languages (English, Spanish, French, German, Portuguese, Italian, Dutch, Russian, Japanese, Korean, Arabic, Hindi, etc.):
- Localized strings are stored in dictionary objects (e.g., `article` or `c`) inside each page's JS file.
- On `DOMContentLoaded`, element contents are updated dynamically:
  - Header / Headline: `#before` or `#herotoptxt`
  - Subtitle / Description: `#click` or `#herotoptxtsub`
  - CTA Button Label: `#continue` or `#continue-text`
  - Legal Disclaimer: `#disclaimer`

### 5. Compliance & Legal Requirements
To ensure advertising and Chrome Web Store policy compliance:
- **Mandatory Privacy Policy link**: Every landing page **must** link to `https://adblockghost.com/privacy.html`.
- **Clear Disclosure**: Text must state that clicking the button will direct the user to the Chrome Web Store to install the extension.
- **Cache-Control**: Pages declare public caching headers:
  ```html
  <meta http-equiv="Cache-Control" content="public, max-age=172800, s-maxage=172800">
  ```

---

## Directory Layout

```
-=LP=-/
├── AGENTS.md                  # OpenAI Codex / AI Agent instructions & context
├── README.md                  # Project & developer overview documentation
├── ads.txt / robots.txt       # Crawler & ad network validation files
├── default.php / index.html   # Fallback / root handler
│
├── [landing-page].html        # HTML entry points for each angle/theme
│
├── css/                       # Dedicated page styles
│   ├── aurora.css
│   ├── harbor.css
│   ├── track.css
│   ├── compass.css
│   └── ...
│
├── js/                        # Dedicated page scripts (click handlers, i18n, detection)
│   ├── aurora.js
│   ├── harbor.js
│   ├── track.js
│   ├── compass.js
│   └── ...
│
└── img/                       # Shared icons and graphic assets
    ├── emblem.png                # Extension 128x128 brand icon
    ├── ChromeWebStore_Badge...# Official CWS download badges
    ├── boutique.png
    └── ...
```

---

## Landing Page Angle & Theme Inventory

| HTML File | Design Angle / Theme | Primary Use Case |
| :--- | :--- | :--- |
| `harbor.html` | Chrome Native Modal | Universal, high-trust browser dialog appearance |
| `aurora.html` | Chrome Native Modal (Clean) | Streamlined modal with direct accept/cancel options |
| `nexus.html` | Centered Modal with Features | Highlights YouTube ad skip & privacy |
| `offline/track.html` | Audio / MP3 Converter Theme | Targets YouTube-to-MP3 and music downloader traffic |
| `offline/media.html` | Video Streaming Theme | Targets movie/series streaming and video host traffic |
| `offline/trust.html` | Security / Safe Download Theme | File sharing, software download sites ("Safety First") |
| `compass.html` | Cloudflare Human Verification Style | High-converting interstitial verification flow |
| `offline/public.html` | Social Proof / Reviews (4.4 Stars) | Testimonials, user counts ("Loved by 400,000+ Users") |
| `waypoint.html` | Step-by-Step Guide (1-2-3) | Clear instructional installation funnel |
| `offline/filter.html`, `offline/sharp.html`, `offline/swift.html` | Modern minimal landing pages | High-speed mobile and desktop layouts |
| `horizon.html`, `prism.html` | Full-width feature showcases | Broad popup blocker promotion |

---

## Guidelines for Modifying or Adding New Landing Pages

When maintaining or generating new landing pages in this directory:
1. **Preserve Attribution Parameters**: Always parse `a`, `c`, `s`, `p`, and `lang` from `window.location.search` and forward them to `https://adblockghost.com/re.php?...`.
2. **Include Extension Detection**: Implement the `fetch("chrome-extension://donodhjdnkockalocpljpfahelbfoacc/assets/icon.png")` check to handle seamless post-install redirection.
3. **Keep Privacy & Disclaimer Intact**: Always include the required privacy link (`https://adblockghost.com/privacy.html`) and Web Store installation notice.
4. **Follow 1-to-1 File Convention**:
   - Create HTML file in root: `mytheme.html`
   - Create CSS file in `css/`: `css/mytheme.css`
   - Create JS file in `js/`: `js/mytheme.js`
   - Rely on shared assets in `img/` (e.g. `img/emblem.png`, `img/storefront.png`).
5. **Responsive & Fast**: Ensure zero render-blocking bloat; pages must load instantly across mobile and desktop.

## Asset refresh (2026-10-19)

All HTML, JavaScript, CSS, image, and manifest filenames now use distinct descriptive names without a shared prefix, including unused assets and backups. Server entry points (`default.php`, `robots.txt`) retain their conventional names. See `asset-renames.json` for the complete old-to-new mapping and MD5 verification. Campaign landing URLs must use the new filenames and query keys `a`, `c`, `s`, `p`; language overrides remain `lang` / `l`. The neighboring `../-=Website=-/re.php` now accepts short keys (plus legacy aliases), sets existing attribution cookie names, and forwards short keys to the Web Store. Deploy that backend change together with these pages.
