1. Overview
Cloakly Pro is an ultra-low-latency, zero-redirect cloaking and traffic protection engine built for performance media buyers, affiliate marketers, and growth agencies. It scrutinizes incoming clicks across 7 detection layers in under 50 milliseconds, distinguishing genuine human buyers from ad platform review bots, spy scrapers, and fraudulent traffic.
What is Cloakly
In performance advertising, ad networks (such as Google Ads, Meta, TikTok, and Microsoft Advertising) deploy automated crawlers, headless browser clusters, and manual reviewers to inspect campaign landing pages. Concurrently, competitive intelligence tools (such as AdPlexity, SpyOver, and Anstrex) constantly scrape advertisements to steal high-converting funnels.
Cloakly acts as an intelligent traffic gateway:
Verified buyers matching your target geography, device requirements, and clean hardware fingerprint are routed immediately to your high-converting promotional page (Black Page). All tracking tokens, UTM parameters, and Click IDs are preserved.
Ad network inspection spiders, datacenter crawlers, VPN proxies, and spy bots are silently presented with a 100% policy-compliant decoy page (White Page), rendered locally on the same server without triggering redirect alarms.
Traffic Sources
Cloakly Pro includes specialized heuristics and pre-configured crawler databases for every major digital acquisition channel:
| Traffic Platform | Primary Crawler Signatures | Default Tracking Token | Optimization Focus |
|---|---|---|---|
| Google Ads (Search & GDN) | AdsBot-Google, Googlebot, Feedfetcher |
gclid |
Zero-redirect local execution, ValueTrack token preservation |
| Meta Ads (FB & IG) | facebookexternalhit/1.1, Facebot, AS32934 |
fbclid |
Mobile in-app browser isolation, Meta CAPI event sync |
| TikTok Ads | Bytespider, TikTokBot, AS138699 |
ttclid |
Touchscreen hardware validation, emulator quarantine |
| Microsoft Ads (Bing) | bingbot, msnbot, AS8075 (Azure) |
msclkid |
Syndicated partner click scrubbing, Azure IP shielding |
| Yandex Direct | YandexBot, YandexDirectDyn |
yclid |
Turbo page compatibility, CIS ASN filtering |
| X (Twitter) Ads | Twitterbot/1.0 |
twclid |
Timeline webview detection, preview crawler dropping |
| Native (Taboola, Outbrain, MGID) | Publisher scrapers, click-fraud clusters | Custom macros | High-velocity bot scrubbing, placement blacklisting |
| In-App & WebViews | Headless WebView emulators | Deep links | Package name verification, hardware sensor inspection |
Integration
Cloakly supports three primary integration methodologies depending on your hosting stack:
- PHP Zero-Footprint Integration (Recommended): A single, lightweight
index.phpfile uploaded directly to your server root. It intercepts the HTTP request before any HTML is sent to the client. Zero external cloaker URLs or footprints are exposed. - Reverse Proxy Integration: Cloakly runs on your front-end host, internally fetching and streaming the remote Money Page or Safe Page via cURL while keeping your domain visible in the browser address bar.
- Client-Side JavaScript Integration: An asynchronous JavaScript tag embedded into static hosting platforms (such as Shopify, Webflow, or static Jamstack sites) where server-side PHP cannot run.
System Requirements
The Cloakly client script is engineered to run on virtually any modern web hosting environment with minimal resource overhead:
PHP Environment
PHP 7.4, 8.0, 8.1, 8.2, or 8.3 (PHP 8.2+ recommended for peak JIT performance).
Required Extensions
php-curl, php-json, php-mbstring, and openssl.
Web Servers
Apache 2.4+ (mod_rewrite), Nginx 1.18+, LiteSpeed, OpenLiteSpeed, or Caddy.
Hosting
The reputation of your web host directly affects ad approval rates. Ad bots check IP subnet ownership and neighbor domains during compliance audits.
Use clean Virtual Private Servers (VPS) or reputable managed hosting (DigitalOcean, Vultr, Linode, Hetzner, Cloudways, or cPanel on reputable providers). Avoid free hosting providers, shared hosting subnets flagged with spam, or bulletproof hosts that trigger immediate automated Google policy rejections.
CDN (Cloudflare Setup)
If your domain routes through Cloudflare, follow these mandatory configuration steps to prevent IP masking issues and caching interference:
- SSL/TLS Mode: Set to
FullorFull (strict). Never useFlexible, as it causes redirect loops. - Header Forwarding: Ensure your web server reads
HTTP_CF_CONNECTING_IPinstead of the Cloudflare proxy IP. Cloakly automatically checksCF-Connecting-IP, but web server logs also requiremod_remoteip(Apache) orset_real_ip_from(Nginx). - Disable Rocket Loader: Turn off Rocket Loader under Speed → Optimization, as it defers JavaScript execution and can interfere with hardware JS fingerprinting payloads.
- Cache Rules: Create a Cache Rule to Bypass Cache for dynamic landing page endpoints (e.g.
/*) so every single visitor executes the Cloakly evaluation script dynamically.
Workflow
The end-to-end traffic lifecycle operates sequentially:
Visitor Clicks Ad
A user or review bot clicks your live advertisement on Google, Meta, TikTok, or a Native ad network.
HTTP Request Hits Server Root
The client's browser sends an HTTP GET request to your server, executing the Cloakly index.php integration script.
Pre-Flight Inspection (<5ms)
Cloakly inspects the visitor's IP against 450,000+ datacenter CIDRs, ASN registries (AWS, GCP, Azure), VPN/proxy blacklists, and User-Agent patterns.
Client-Side Hardware Fingerprinting (Optional Layer)
For border-line or new visitors, a transparent hardware probe gathers Canvas 2D, WebGL GPU vendor, AudioContext variance, and automation artifacts.
Decision Routing
Clean Human: Shown your Money Page with all UTM/Click IDs intact.
Bot / Reviewer / Flagged IP: Shown your compliant Safe Page (index2.php) without any HTTP redirects.
2. How It Works
Traditional cloakers rely exclusively on basic IP lists and User-Agent strings. Modern ad reviewers (Google Headless Chromium, Meta Crawlers, TikTok Reviewers) easily bypass these superficial checks by rotating residential proxy IPs and spoofing authentic mobile User-Agents. Cloakly combines multi-tier IP intelligence with client-side hardware fingerprinting and machine-learning anomaly models.
Blacklisting & IP Intelligence
Cloakly maintains a dynamically refreshed, high-confidence blacklist database encompassing over 450,000 CIDR ranges and autonomous system numbers (ASNs). Every visitor’s IP address is checked in memory (<1ms) against:
Cloud Datacenters & Hosting ASNs
Instant rejection of traffic originating from server infrastructure: Amazon Web Services (AS16509), Google Cloud Platform (AS15169), Microsoft Azure (AS8075), DigitalOcean (AS14061), Hetzner (AS24940), OVH (AS16276), Linode (AS63949), and Alibaba Cloud.
Commercial VPNs & Tor Exit Nodes
Active identification of commercial privacy VPNs (NordVPN, ExpressVPN, Surfshark, Mullvad), public and private proxies, and the official Tor directory node list.
Ad Network Crawler Egress Pools
Specialized IP clusters operated by Google Ads compliance offices (Mountain View, Dublin, Zurich), Meta Ireland, ByteDance review hubs, and Microsoft Bing ad-quality inspection centers.
Competitive Ad Spy Tools
Scraper ranges belonging to commercial spy tools (AdPlexity, Anstrex, SpyOver, BigSpy, Adbeat) are permanently blacklisted to prevent funnel theft.
Deep Client-Side Hardware Fingerprinting
When JS Fingerprinting is active, a microscopic, non-blocking script executes in the visitor's browser. It extracts physical hardware and GPU signatures that cannot be spoofed by HTTP request headers alone:
Renders a 2D canvas containing complex geometric shapes, gradients, and font glyphs. Due to GPU rendering pipelines, font anti-aliasing variations, and OS display subpixel differences, every physical machine generates a unique cryptographic hash.
Queries the WEBGL_debug_renderer_info extension to retrieve the unmasked graphics card renderer (e.g. Apple M3 Max or NVIDIA GeForce RTX 4080). Headless crawlers and emulators disclose virtualized renderers like SwiftShader, llvmpipe, or Mesa Offscreen.
Initializes an audio oscillator node routed through a dynamics compressor. Captures the float32 frequency buffer to measure minute mathematical variances in the sound card digital signal processor (DSP). Virtual bots lack audio hardware and yield static null vectors.
Probes for the presence of navigator.webdriver, Puppeteer runtime artifacts, Playwright execution hooks, missing native plugins, phantom mouse coordinates, and inconsistent window.outerWidth / window.innerWidth ratios.
Machine Learning (VLA™ Anomaly Scoring)
Cloakly utilizes a proprietary multivariate anomaly detection engine termed VLA™ (Vision-Language-Action & Anomaly Engine).
- Behavioral Heuristics: Compares the visitor's browsing cadence, scroll acceleration, pointer trajectory, and touch pressure against millions of verified human ad click models.
- Mismatch Cross-Checking: Correlates HTTP header data with physical hardware realities. For example, if an HTTP User-Agent claims to be an iPhone 15 Pro, but the WebGL renderer reports an Intel UHD 630 graphics chip and zero touchpoints, the anomaly score spikes to 100% and routes the visitor to the Safe Page.
- Continuous Adaptive Learning: When ad platforms deploy new inspection clusters or crawler signatures, Cloakly’s global telemetry updates the scoring models across all active accounts in real time.
Our Multi-Tier Hybrid Defense Approach
Rather than imposing a heavy JavaScript delay on every click, Cloakly deploys a tiered progressive filtering strategy:
| Tier | Inspection Layer | Execution Time | Target Dropped |
|---|---|---|---|
| Tier 1: Edge Check | Datacenter IP lists, ASNs, known bots, missing headers | < 3ms | ~85% of crude crawlers and datacenter spiders |
| Tier 2: Geo & Device Match | Target country allowlist, OS/Browser compliance | < 5ms | Out-of-geo traffic, foreign VPNs, wrong device types |
| Tier 3: Hardware JS & VLA™ | Canvas, WebGL, AudioContext, automation hooks | Asynchronous | Sophisticated headless Chrome bots & manual human reviewers |
3. Playbook
Practical execution strategies for each major digital advertising platform. Learn the exact crawler behaviors, review protocols, and campaign settings required to pass ad approval and maximize campaign longevity.
Cloaking Google (Search, GDN & PMax)
Google employs automated web crawlers (including AdsBot-Google, AdsBot-Google-Mobile, Googlebot, and Feedfetcher-Google) alongside regional manual human policy review teams in California, Ireland, and Singapore.
The domain specified in your Google Ads Final URL must match the domain hosting your safe page and Cloakly PHP script. Never redirect Google Ads directly to a third-party domain from the ad click.
- Initial Review Phase: Set the Stream Mode to Review Mode or Safe Page Only prior to submitting your ad for review. Keep this mode active for the first 24–48 hours until impressions begin registering consistently.
- Auto-Tagging (gclid): Keep Google auto-tagging enabled. Cloakly checks for the presence of the
gclidparameter and forwards it automatically to your Money Page. - ValueTrack Parameters: Append standard tracking tokens to your final URL:
Recommended Google URL Format
https://yourdomain.com/?utm_source=google&utm_campaign={campaignid}&utm_term={keyword}&gclid={gclid} - Transitioning to Active: Once your ad is marked "Eligible / Approved" and has accumulated 15–20 genuine impressions, switch the stream mode to Active.
Cloaking Google (Tracking Template)
If your marketing setup requires third-party affiliate trackers (such as Voluum, RedTrack, or Keitaro), configure Google's Tracking Template rather than pointing the ad directly to an affiliate redirect link.
{lpurl}?utm_source=google&utm_medium=cpc&utm_campaign={campaignid}&keyword={keyword}&gclid={gclid}
Google policy auditors evaluate whether {lpurl} (Landing Page URL) and the final destination render identical thematic content during review. Cloakly's zero-redirect execution ensures that the reviewer is greeted by the compliant safe page on the exact landing page URL requested.
Cloaking Facebook (Meta Ads)
Meta (Facebook & Instagram) utilizes automated preview spiders—principally facebookexternalhit/1.1 and Facebot—operating out of Meta's corporate ASN (AS32934). Meta also executes headless rendering tests whenever an ad is created or edited.
In-App Browser Support
Mobile Facebook and Instagram clicks open inside Meta's built-in in-app browser (User-Agent containing FBAN/FBAV or Instagram). Ensure your money page renders flawlessly inside mobile webviews.
Meta Pixel & CAPI Forwarding
Cloakly preserves the fbclid parameter. When the user completes a purchase on your Money Page, pass the original fbclid and user IP to the Meta Conversions API (CAPI) for 100% event attribution.
Cloaking TikTok
TikTok Ads traffic is 99% mobile (iOS & Android). TikTok's automated crawler network (Bytespider) and manual review squads originate from ByteDance datacenters (AS138699 / AS396986) primarily located in Singapore, the US, and Ireland.
- Require Touchscreen Devices: In your stream filtering settings, enable Allow Only Touchscreen Devices. Desktop-based automated ByteDance crawlers lack touch hardware (
maxTouchPoints = 0) and are instantly relegated to the Safe Page. - Click ID Tracking: TikTok automatically appends
ttclidto outgoing clicks. Cloakly captures and relays this token directly to your offer URL for TikTok Events API synchronization.
Cloaking Microsoft Ads (Bing)
Microsoft Advertising inspection spiders (bingbot, msnbot) originate almost exclusively from Microsoft Azure cloud subnets (AS8075).
Microsoft distributes ads across partner networks (Yahoo, DuckDuckGo, AOL). These partners often send bot click-verification bursts. Enabling Cloakly's Unique Visitors Only setting ensures duplicate bot verification clicks never hit your Money Page.
Cloaking Yandex
Yandex Direct deploys sophisticated automated crawlers (YandexBot, YandexDirectDyn) and inspects landing pages via Yandex Metrika WebVisor telemetry.
- Ensure your Safe Page contains legitimate Russian-language or target-market content if running in CIS territories.
- Keep Russian datacenter ASNs (Yandex LLC AS13238, Selectel, Mail.ru) blacklisted.
- Preserve the
yclidquery parameter for Yandex Metrika offline conversion uploads.
Cloaking X (Twitter Ads)
X evaluates ad cards by scraping open-graph meta tags using Twitterbot/1.0. Cloakly serves your Safe Page to Twitterbot, ensuring preview cards render compliant images and headlines, while human followers clicking the tweet in their timeline receive your Money Page.
Cloaking Native Ads (Taboola, Outbrain, MGID, Revcontent)
Native advertising networks suffer from high volumes of publisher scrapers, fraudulent click farms, and competitive spy tools.
Placement Zone Scrubbing
Pass publisher placement tokens (e.g. {site}, {widget_id}, {campaign_id}) into your stream URL. Inspect Cloakly's Click Stream to identify placements generating robotic non-converting clicks, and add them to your blacklist zones.
Cloaking WebView Apps
When serving traffic inside mobile applications (e.g., in-app interstitials or rewarded video browsers), modern WebViews have unique characteristics:
- Android WebView Signature: Transmits
; wv)in the User-Agent and sends theX-Requested-With: com.app.packageheader. - iOS WKWebView Signature: Emits mobile Safari signatures without certain native Safari URL-bar manipulation capabilities.
- In Cloakly Stream settings, toggle Allow Traffic From Mobile Apps to permit or quarantine in-app browser sessions according to your offer’s compatibility.
In-app Cloaking
For mobile app developers deploying landing pages inside native wrappers:
- Dynamic Deep Links: Use Cloakly's API to verify client integrity before triggering native deep-link intents (
custom-scheme://or Universal Links). - Emulator Detection: Google Play Store and Apple App Store review bots run emulated Android SDK / iOS Simulator instances. Cloakly’s hardware fingerprinting flags virtualized ARM/x86 CPU signatures, presenting reviewers with a compliant in-app view.
Blacklist Bot Zones
In native and programmatic display campaigns, specific publisher domains, app IDs, or widget IDs generate purely synthetic clicks to inflate publisher revenue.
Cloakly allows you to configure URL Rules matching widget_id or zone_id parameters. Known fraudulent zones can be routed directly to the Safe Page or returned an HTTP 403 Forbidden status, preserving your affiliate payout and media budget.
Hide Traffic Source (Referrer Blanking & Spoofing)
Protect your high-performing campaigns from competitor surveillance and affiliate network sniffing:
- Blanking Referrer: Cloakly can inject
<meta name="referrer" content="no-referrer">before forwarding the user. The downstream offer page sees a clean direct visit with an emptyHTTP_REFERERheader. - Referrer Spoofing: Routes the visitor through a neutral intermediary bridge domain, stripping the original ad network origin.
4. Streams
A Stream is the foundational routing pipeline in Cloakly. It encapsulates the entry parameters, risk scoring rules, white/black page destinations, rotator weights, and technical routing actions for an advertising campaign.
Basic Settings
Every stream contains key administrative properties:
- Name: Unique, descriptive title for the stream (e.g.
Google Search - US Tier 1 Nutra). - Tags: Space- or comma-separated taxonomy labels used to organize and batch-filter reporting (e.g.
facebook, usa, solar, high-cpc). - Mode: Operational state of the stream:
Active: Normal cloaking operation. Approved traffic goes to Money Page; bots go to Safe Page.Safe Page Only: 100% of visitors (including genuine users) see the Safe Page. Recommended during initial ad review.Money Page Only: All filters bypassed. Use exclusively for sandbox testing.Review Mode: Aggressive protection. Any IP visiting during this mode is permanently added to the stream's blacklist.
- Notes: Free-text operator notes, change logs, and offer expiration details.
- Macros: Dynamic placeholders injected into URLs, code snippets, or postbacks:
{click_id}{sub1}{sub2}{sub3}{sub4}{sub5}{country}{city}{ip}{isp}{os}{browser}{cost}
Money and Safe Pages
The core destination architecture splits traffic between compliant decoy assets and monetized landing pages.
Money Page (Black Page) Configuration
The destination rendered for approved human visitors. Multiple Money Pages can be added to a single stream to conduct A/B split tests:
- Action: Method used to display the Money Page (Local file, Reverse proxy, Redirect, etc.).
- PT (Parameter Passthrough): When checked, all incoming query string parameters (UTM tags,
gclid,fbclid) are automatically forwarded to the Money Page URL. - Weight (1–100): Relative traffic distribution weight when running multiple active Money Pages.
- “On” Checkbox: Quick toggle to pause or activate a specific offer URL without deleting it.
Split Rotator
Randomly distributes approved visitors between enabled Money Pages in proportion to their assigned weights. For example, Page A (Weight 70) and Page B (Weight 30) will receive a 70/30 traffic split.
Timer Rotator
Switches active Money Pages based on configured calendar schedules or operational hours (e.g. directing traffic to an active call center landing page during day hours and a lead-gen form at night).
Safe Page (White Page) Configuration
The destination presented to crawlers, reviewers, and out-of-geo visitors. By default, Cloakly executes index2.php directly on the server (zero redirect). You may also configure an external fallback URL or a custom HTTP status code.
Actions (21 Comprehensive Routing Behaviors)
Cloakly provides 21 granular routing actions to control exactly how the browser or server renders content for both Money and Safe pages:
| Action Name | Type | HTTP Status / Mechanism | Footprint & Best Use Case |
|---|---|---|---|
| Local File (“Zero Redirect”) | Server | PHP include() / require() |
0% Footprint Best for Safe Page (index2.php) and local landing pages. Completely invisible to network inspection. |
| Reverse Proxy | Server | cURL Stream / Asset Rewrite | Pulls remote offer content and streams it directly under your clean domain. No browser redirect occurs. |
| Insert HTML Code | Server | Inline HTML Template Output | Renders custom raw HTML, notice pages, or verification forms directly. |
| Display in Iframe | Client | 100vw / 100vh Fullscreen Iframe | Embeds external destination inside a borderless viewport wrapper. Keeps your root domain in the address bar. |
| HTTP 301 Moved Permanently | Header | HTTP/1.1 301 Moved Permanently |
Cached permanent redirect. Useful for permanent domain migrations; avoid for active cloaking. |
| HTTP 302 Found | Header | HTTP/1.1 302 Found |
Standard temporary redirect. Simple, but detectable by ad crawlers as a redirect chain. |
| HTTP 303 See Other | Header | HTTP/1.1 303 See Other |
Forces the client to retrieve the destination URL using HTTP GET, regardless of initial request method. |
| HTTP 307 Temporary Redirect | Header | HTTP/1.1 307 Temporary Redirect |
Strict temporary redirect that guarantees the HTTP request method (e.g. POST payload) is not altered. |
| HTTP 308 Permanent Redirect | Header | HTTP/1.1 308 Permanent Redirect |
Permanent counterpart to 307; preserves method and body across redirections. |
| No Action | Server | Pass-through | Allows execution to continue down the native host web pipeline without intervention. |
| HTTP Refresh Header | Header | Refresh: 0; url=... |
Transmits an HTTP-level refresh directive. Clears referrer on supporting legacy browsers. |
| HTML Meta Refresh | Client | <meta http-equiv="refresh" content="0;url=..."> |
HTML-based client-side redirection. Bypasses basic HTTP header inspection crawlers. |
| Form Submit | Client | Auto POST form.submit() |
Renders an invisible form and triggers instant submission via JS. Masks destination URL from GET logs. |
| JavaScript assign() Redirect | Client | window.location.assign(...) |
Navigates client to the URL while preserving browser history. |
| JavaScript replace() Redirect | Client | window.location.replace(...) |
Replaces the current history entry. Prevents the visitor from clicking "Back" to re-trigger the cloaker. |
| Break Out of Frame | Client | if(top!=self) top.location = ... |
Breaks out of hostile parent iframes or preview sandbox wrappers. |
| Custom HTTP Response Code | Header | 403 Forbidden, 404 Not Found, 410 Gone | Returns raw error code to bot or crawler without serving any decoy content. |
| Execute PHP Code | Server | Dynamic PHP Execution | Executes custom server-side callback logic or custom database queries before routing. |
| Execute JavaScript Code | Client | Custom Client Script Payload | Injects tracking pixels, custom canvas obfuscation, or dynamic lead-capture modals. |
| X-Accel-Redirect Header | Server | Nginx Internal Redirection | Instructs Nginx to serve internal protected static assets without PHP overhead. |
| X-Sendfile Header | Server | Apache / Lighttpd File Streaming | Leverages web server kernel zero-copy mechanics to stream large landing page bundles efficiently. |
| Delayed Start | Pipeline | Time / Click Threshold Quarantine | Automatically forces Safe Page routing for the first $N$ hours or $X$ clicks before activating Money Pages. |
Filtering Settings
Fine-tune risk evaluation sensitivity and hardware heuristic gates:
- Filtering Level:
Conservative: Minimum false-positive rate. Routes only confirmed datacenter ASNs to Safe Page. Best for cold account warmups.Moderate (Recommended): Standard balance. Activates ASN blacklists, known crawler headers, and basic proxy detection.Aggressive: Strict filtering. Rejects residential VPNs, anonymizers, suspicious subnets, and non-standard browser signatures.Paranoid: Maximum security. Requires clean hardware JS fingerprinting pass; drops any unfamiliar User-Agent or out-of-geo IP immediately.
- Enable JavaScript Fingerprinting and VLA™ Model Training: Toggles client-side hardware profiling (Canvas, WebGL, AudioContext, automation hooks).
- Enable Built-in User Agent-based Filters: Blocks known crawler, spider, and scraper strings automatically.
- Allow Only Unique Visitors: Drops repeat visits from the same IP address within a configurable window (e.g. 24 hours). Prevents manual reviewer multi-click audits from inspecting your Black Page.
- Allow Only Touchscreen Devices: Restricts Black Page access to devices reporting touch hardware (
maxTouchPoints > 0). Drops desktop-based emulators. - Allow Only Visitors With In-browser Web3 Wallets: Detects
window.ethereumorwindow.solana. Designed specifically for crypto & dApp marketing campaigns. - Allow Traffic From Mobile Apps: Permits or blocks WebView traffic generated inside mobile apps.
- Allow Traffic From Frames, Iframes, and Embedded Objects: Blocks clicks if loaded within third-party frames (
Sec-Fetch-Dest: iframe). - Allow Google IP Protection Traffic (Chrome Privacy Sandbox): Manages emerging Google Chrome IP masking proxy pools.
- Allow Apple iCloud Private Relay Traffic: Allows or blocks Apple subscriber egress proxies (flagged as Apple Inc. ASNs).
Countries and Devices
GeoIP Allowlisting
Specify exact ISO-2 country codes (e.g. US, CA, GB, AU, DE). Any click originating from unlisted countries is routed to the Safe Page instantly. Supports individual state/region filtering where available.
Device & OS Breakdown
Filter by device class (Desktop, Mobile, Tablet), Operating System (iOS, Android, Windows, macOS, Linux, ChromeOS), and Browser family (Chrome, Safari, Firefox, Edge, Opera, Samsung).
Tracking Settings
Configure affiliate tracking parameters and cost attribution:
- Sub ID: Map incoming tracking tokens to standard slots
sub1throughsub5(e.g.sub1={placement}&sub2={creative_id}). - Click ID: Designate the primary click identification query parameter (
gclid,fbclid,ttclid,msclkid, or customclickid). - Click Cost: Assign a fixed Cost Per Click (CPC) or parse dynamic bid tokens (e.g.
cpc={cpc}) to calculate campaign ROI in real-time reporting.
IP Address Filtering
- IP/ASN List Mode: Toggle between Blacklist (drop specified IPs/ASNs) and Whitelist (allow only specified IPs/ASNs).
- Blacklist All IP Addresses in Review Mode: When active, every single visitor IP that hits the stream while in Review Mode is automatically added to the stream’s persistent IP blacklist. Ensures ad review crawlers can never revisit your Money Page.
- IP Extrapolation: When an inspection bot IP is identified, Cloakly automatically extrapolates and blacklists the entire
/24CIDR block (all 256 surrounding IPs), neutralising bot clusters using IP rotation.
User Agent Filtering
Create granular rules targeting client User-Agent strings. Supports Contains, Exact Match, and Regular Expressions (Regex):
/(HeadlessChrome|Puppeteer|Playwright|PhantomJS|Wget|curl|Python|Scrapy)/i
/Googlebot|AdsBot-Google|facebookexternalhit|Bytespider|bingbot/i
Referrer Filtering
Inspect the HTTP_REFERER header sent by the visitor's browser:
- Referrer List Mode: Whitelist only approved traffic origins (e.g.
*.google.com,*.facebook.com,*.tiktok.com). - Blank Referrer Policy: Choose whether to permit or reject traffic lacking an HTTP Referrer (direct traffic, bookmarks, or aggressive privacy extensions).
URL Rules
Define custom conditional routing based on URL structure, query parameters, or request headers:
- Required Parameter: Only allow traffic containing a specific key (e.g. require
gclidto be non-empty). - Parameter Value Match: Direct visitors to specific landing pages based on parameter values (e.g. if
utm_creative=v2, route to Money Page B).
Filtering by Time (Dayparting & Timezone Matching)
Temporal rules help evade manual inspection teams and optimize campaign spend:
Schedule (Dayparting)
A visual 7-day, 24-hour interactive grid. Restrict Money Page access to high-converting buyer hours. During off-hours or peak reviewer review windows (e.g. 9 AM–5 PM PST), automatically divert all clicks to the Safe Page.
Match Browser Timezone to Location
Cross-examines client browser clock timezone (via Intl.DateTimeFormat().resolvedOptions().timeZone) against the IP’s geographic timezone. Flag mismatches caused by offshore manual review teams using foreign VPNs.
5. Integration
Cloakly offers multiple implementation patterns for web servers, CMS environments, and static front-ends. Learn how to deploy the client script, inspect scan response headers, and switch streams dynamically.
PHP Integration Overview
The PHP client integration is the industry benchmark for affiliate cloaking because it executes on your web server before any HTTP response headers or HTML markup are sent to the client browser. Ad bots receive your Safe Page without ever detecting that a decision engine ran.
/public_html/ (or web root)
├── index.php <-- Cloakly Integration File (Downloaded from Campaign Dashboard)
└── index2.php <-- Your Compliant Safe Page (HTML or PHP)
Forward PHP Integration
In Forward Integration, Cloakly's index.php sits at the root entry point of your domain:
- Visitor accesses
https://yourdomain.com/. index.phpcontacts the Cloakly API engine or processes local fast-cache rules.- If approved: Renders or forwards visitor to your Money Page.
- If blocked: Includes
index2.phpin place without an HTTP redirect.
Reverse PHP Integration
In Reverse Integration, you keep your existing landing page code intact and embed the Cloakly check at the very top of your file before any output:
<?php
require_once __DIR__ . '/cloakly_client.php';
$cloak = new CloaklyClient([
'campaign_id' => 'cmp_live_984129',
'api_key' => 'ck_live_a89f81bc92'
]);
$decision = $cloak->evaluate();
if (!$decision->isAllowed()) {
// Show Safe Page and terminate execution
include __DIR__ . '/safe_content.php';
exit;
}
// Clean human: Continue rendering your Money Page below
?>
<!DOCTYPE html>
<html>
<head><title>Exclusive Product Offer</title></head>
...
WordPress and Other CMS Integration
To cloak a WordPress site without breaking internal admin paths:
- Hook into
wp-config.phpor Themefunctions.php: Ensure admin paths (/wp-admin/,/wp-login.php,/wp-json/) bypass cloaking checks. - Root
index.phpPrepend: Prepend the Cloakly client snippet beforewp-blog-header.php:WordPress root index.php<?php if (!str_contains($_SERVER['REQUEST_URI'] ?? '', 'wp-admin')) { require_once __DIR__ . '/cloakly_client.php'; // Cloakly handles routing if target campaign matches } // Native WordPress bootstrap continues require __DIR__ . '/wp-blog-header.php';
Getting Scan Status (Inspection Headers)
During debugging, Cloakly can be configured to emit stealth diagnostic HTTP headers:
X-Cloakly-Decision: allow | safe_page | block_403
X-Cloakly-Score: 12
X-Cloakly-Rule: GeoAllow, CleanHardware, NoBotUA
X-Cloakly-Latency-Ms: 18.4
Always disable debug headers before submitting ads to Google or Meta to maintain a zero-footprint HTTP profile.
JavaScript Integration (Static Front-ends)
For static Jamstack hosts, Webflow, Shopify, or Wix where PHP cannot run, paste the asynchronous Cloakly JS Tag in the <head>:
<script>
(function(c,l,o,a,k){
c[o]=c[o]||function(){(c[o].q=c[o].q||[]).push(arguments)};
a=l.createElement('script');a.async=1;a.src='https://cdn.cloakly.pro/sdk/v1/engine.js';
a.dataset.campaign='cmp_live_984129';
k=l.getElementsByTagName('script')[0];k.parentNode.insertBefore(a,k);
})(window,document,'Cloakly');
</script>
Switching Streams Dynamically
A single domain can route across multiple campaigns using stream selectors:
- Path-Based: Route
/offer-a/to Stream A and/offer-b/to Stream B. - Query-Based: Route based on
?stream=us_searchor traffic source tokens. - Header-Based: Route dynamically based on Cloudflare country headers (e.g.
CF-IPCountry).
6. Integration with Keitaro
Keitaro is a premier self-hosted tracking platform for performance affiliates. Cloakly integrates seamlessly with Keitaro via a custom filter script or stream webhooks.
Filter Installation in Keitaro
Deploy the Cloakly evaluation hook directly into Keitaro’s internal filter directory:
- Download the
cloakly_keitaro_filter.phpscript from your Cloakly campaign dashboard. - Connect to your Keitaro server via SFTP or SSH.
- Upload the file into the Keitaro filters directory:
Keitaro Filters Directory Path
/var/www/keitaro/application/filters/CloaklyFilter.php - Restart PHP-FPM or clear the Keitaro application cache from the admin panel (Maintenance → Clear Cache).
Campaign Setup in Keitaro
Configure your Keitaro campaign with two dedicated streams:
Under Stream Filters, select Cloakly Filter and choose Allowed = YES. Configure your landing page or affiliate offer schema.
Set Stream Schema to Direct / Default with no filters, placed below Stream 1. Any traffic failing the Cloakly filter falls through to this compliant safe page.
7. Integration with Binom
Binom is an ultra-fast click tracker engineered for volume affiliate media buying. Cloakly connects with Binom v1 and Binom v2 through API pre-routing or custom PHP landing page inclusion.
Binom Campaign Configuration
There are two primary methods to connect Cloakly with Binom:
Method A: Pre-Tracker Cloaking (Recommended)
Your ad campaign points to a Cloakly-protected domain. Human visitors are routed to your Binom campaign link (e.g. https://tracker.com/click.php?key=...), while bots are shown the Safe Page locally.
Method B: Binom Landing Page Hook
Embed Cloakly client execution inside your Binom LP index file. If the Cloakly check flags the visitor as a bot, render compliant safe content instead of executing the Binom CTA link:
<?php
require_once __DIR__ . '/cloakly.php';
if (!cloakly_verify()) {
include __DIR__ . '/safe.html';
exit;
}
// Serve Black LP with Binom click URL
?>
8. Troubleshooting
Comprehensive diagnostic directory resolving the most common integration hurdles, server configuration errors, and ad network policy alerts.
Error php-curl Extension Is Missing
Cause: Your web server’s PHP runtime lacks the cURL library required to communicate with Cloakly’s cloud scoring cluster.
- Ubuntu / Debian VPS:
sudo apt-get install php-curl && sudo systemctl restart php-fpm apache2 - cPanel / WHM: Navigate to Software → Select PHP Version → Extensions and check the box for
curl.
Error php-json Extension Is Missing
Cause: The json_encode and json_decode functions are unavailable, preventing token payload serialization.
sudo apt-get install php-json or enable json in cPanel PHP Extensions.
Error Curl Error: Couldn't Resolve Host Name
Cause: Your web server's local DNS resolver failed to resolve Cloakly's API endpoint (e.g. api.cloakly.pro).
/etc/resolv.conf to Google or Cloudflare public resolvers:
nameserver 1.1.1.1
nameserver 8.8.8.8
404 File Not Found
Cause: The path specified for your Safe Page (e.g. index2.php) or local landing page does not exist in the designated server directory.
index2.php is placed in the exact same directory as your Cloakly index.php file with 0644 permissions.
Layout Page Looks Broken (Missing CSS / JS / Images)
Cause: When using Reverse Proxy or local file inclusion, relative resource paths (e.g. href="style.css") break if your offer assets live on a different domain or path.
- Add a
<base href="https://your-original-offer.com/">tag into the<head>of the landing page. - Convert relative CSS/JS asset paths to absolute URLs (e.g.
/assets/style.css→https://cdn.yourdomain.com/assets/style.css).
Loop Too Many Redirects (ERR_TOO_MANY_REDIRECTS)
Cause: Cloudflare SSL is set to Flexible while your server enforces HTTPS, or your Money Page URL redirects back to the cloaked entry point.
PHP Blank Page (White Screen of Death)
Cause: A fatal PHP syntax error or memory exhaustion occurred with display_errors = Off.
/var/log/nginx/error.log or cPanel Errors log. Temporarily append ini_set('display_errors', 1); error_reporting(E_ALL); at the top of index.php for diagnostic output.
403 Forbidden (Error 403)
Cause: Server file permissions are too restrictive, or a server web application firewall (ModSecurity, Imunify360) is blocking the request.
0644 for PHP files and 0755 for directories. In cPanel, temporarily disable ModSecurity to verify whether a firewall rule is triggering.
JS Acquiring JS Fingerprint (MIA / Timeout)
Cause: The client browser took longer than the configured timeout (e.g. 2500ms) to submit hardware tokens, or the user is running an aggressive script blocker.
CORS JS Fingerprint Error
Cause: Cross-Origin Resource Sharing (CORS) policy blocked the client from transmitting the fingerprint payload back to the reporting endpoint.
Analytics No Clicks In Reports
Cause: Cloudflare or reverse proxy caching is serving cached HTML without executing the PHP script, or your Campaign API Key is misconfigured.
index.php matches your account dashboard.
IP Clicks Tagged Cloudflare (All Visitors Share One IP)
Cause: Your web server reads $_SERVER['REMOTE_ADDR'] directly, which reflects Cloudflare’s reverse proxy IPs rather than the visitor’s actual IP.
- Apache: Enable
mod_remoteipand configureRemoteIPHeader CF-Connecting-IP. - Nginx: Add Cloudflare IP ranges to
set_real_ip_fromand setreal_ip_header CF-Connecting-IP;.
Latency Click Count Mismatch, High Lag
Cause: Geographically distant hosting servers causing high latency during API calls, or ad networks charging for clicks where users bounced before DNS resolved.
500 Internal Server Error (Error 500)
Cause: Invalid directives in .htaccess or incompatible PHP version syntax.
.htaccess to .htaccess.bak to test. Ensure your PHP version is at least PHP 7.4 (PHP 8.1+ strongly recommended).
Google Policy Google Ads: Compromised Site or Malicious Software
Cause: Google's automated scanners detected external scripts, unverified redirect chains, or policy-violating keywords on the domain.
- Scan your server files for malware or outdated WordPress plugins via Wordfence or Imunify360.
- Ensure your Safe Page is a genuine, rich editorial or business page with functioning Privacy Policy, Terms, and Contact Us pages.
- Submit an appeal in Google Ads Policy Manager requesting a manual audit of the compliant Safe Page.
9. Safe Page Generator
The Safe Page Generator is Cloakly’s built-in white page builder. It instantly crafts high-converting, policy-compliant decoy websites engineered to pass rigorous automated crawler inspections and manual reviewer audits across Google Ads, Meta, TikTok, and Microsoft Advertising.
Why a High-Quality Safe Page Is Mandatory
Ad network policy bots no longer accept one-page blank placeholders, "Under Construction" notices, or generic Wikipedia copy-pastes. When an ad reviewer audits your landing page, they inspect:
- Thematic Relevance: The Safe Page headline, copy, and images must closely reflect the ad creative and keywords submitted to the ad platform.
- Legal Disclosures: Working Privacy Policy, Terms of Service, and Cookie Notice links are mandatory.
- Navigational Integrity: Fully functional navigation menus, footer links, and valid internal routes.
- Clean Code Standards: Semantic HTML5, mobile-responsive CSS, fast load times, and zero external tracking scripts that raise security flags.
Step-by-Step Generator Usage
Select Industry Template
Choose from vetted compliance niches: Clean Energy & Solar Blog, SaaS Productivity Platform, Modern Wellness & Nutrition Guide, Local Home Services Directory, or e-Commerce Catalog.
Customize Branding & Keywords
Enter your business name, primary domain, and ad target keywords. The generator dynamically crafts contextual editorial articles and high-resolution royalty-free imagery.
Automated Compliance Package Injection
The generator automatically creates matching privacy.html, terms.html, contact.html, and GDPR cookie consent overlays pre-populated with your domain name.
Download & Deploy
Download the output bundle as index2.php. Upload it directly to your web server root adjacent to your Cloakly index.php integration file.
Always submit your campaign to Google or Meta with the Safe Page live for at least 48 hours before enabling Money Page routing. This ensures the initial review bot crawl indexes a 100% compliant site.
10. Tracker
Cloakly integrates native conversion tracking and server-to-server (S2S) postback mechanics, closing the loop between incoming clicks, cloaking decisions, and downstream affiliate sales.
Server-to-Server (S2S) Postback
When an approved visitor completes a target action on your affiliate network or CRM (e.g. Lead, Install, Deposit, or Sale), your affiliate network sends an HTTP GET/POST request back to Cloakly’s Postback Gateway:
https://cloakly.pro/api/postback?click_id={click_id}&payout={payout}&status={status}&txid={transaction_id}
| Parameter | Required | Description | Supported Values |
|---|---|---|---|
click_id |
Yes | The unique 32-character click token generated by Cloakly. | Alphanumeric string |
payout |
Optional | Monetary revenue value attributed to the conversion. | Decimal (e.g. 45.00) |
status |
Optional | Lifecycle state of the conversion. | lead, sale, rejected, chargeback |
txid |
Optional | Affiliate network transaction ID for deduplication. | Unique string |
Click IDs & Deduplication
Every incoming request is assigned a unique, collision-resistant Click ID generated at the edge.
- Passing to Affiliate Network: In your Money Page URL, append
click_id={click_id}or map it to your affiliate network’s subid macro (e.g.https://offer.com/?aff_sub={click_id}). - Ad Network Token Forwarding: Cloakly seamlessly preserves native tokens (
gclid,fbclid,ttclid,msclkid) and pairs them with the Cloakly Click ID, enabling dual postbacks back to Google Ads / Meta CAPI for machine-learning conversion optimization.
11. Reporting
High-resolution forensic reporting and conversion analytics. Gain full transparency into every single traffic interaction, bot strike, and revenue event in real time.
Sales Funnel Analytics
Cloakly aggregates raw click data into an interactive multi-stage sales funnel:
Identify conversion drop-offs, track Cost Per Acquisition (CPA), Return on Ad Spend (ROAS), and isolate which traffic sub-IDs are yielding genuine paying customers versus empty clicks.
Real-Time Click Log (Forensic Stream)
Navigate to /clicks in your dashboard to view every incoming request in microscopic forensic detail:
| Attribute | Sample Value | Forensic Value |
|---|---|---|
| Timestamp & Flow | 2026-09-22 14:10:05 |
Exact millisecond arrival time |
| Visitor IP & Country | 172.56.21.84 (🇺🇸 US) |
GeoIP validation & subnet analysis |
| ISP & ASN | T-Mobile USA (AS21928) |
Detects cloud hosting vs residential carriers |
| Hardware Fingerprint | Canvas: e91b2c | WebGL: Apple M3 |
Physical client hardware identification |
| User-Agent & OS | Mozilla/5.0 (iPhone; CPU OS 17...) |
Device, OS, and browser version inspection |
| Decision & Destination | Black Page (Allowed) | Visual color tint: Light green for money, soft gray for safe |
| Triggered Rules | CleanHardware, GeoUS, ValidGclid |
Specific heuristics that guided the routing decision |
12. Best Practices
Battle-tested operational guidelines compiled from veteran media buyers running 7-figure monthly ad spend across Google Ads, Meta, and TikTok.
Domains and Hosting
- Domain History & TLDs: Always prioritize mature
.com,.net, or established ccTLDs (.co.uk,.de,.us). Avoid cheap spam-prone TLDs (such as.xyz,.top,.click) which carry an automatic penalty in Google Ads trust algorithms. - WHOIS Privacy: Ensure WHOIS privacy protection is enabled to prevent competitor intelligence scrapers from linking your advertising assets.
- Dedicated Clean IP: Never host your safe pages on cheap shared hosts containing thousands of penalized spam neighbors. Deploy on independent VPS servers (DigitalOcean, Vultr, Hetzner, AWS EC2).
Cloaking Strategy & Launch Sequence
Safe Page Submission
Upload the compliant Safe Page and set the Cloakly stream to Review Mode. Submit your ad campaign for review.
Approval & Traffic Seeding
Allow the ad to be approved. Let 15–30 real impressions register on the Safe Page to confirm clean crawler passage.
Activate Money Page
Switch Stream Mode to Active. Target buyers will now experience your high-converting Black Page while reviewers continue to see the Safe Page.
Do Not Stand Out! (Congruency & Latency Parity)
• Content Congruency: If your ad headline is "Top 5 Ergonomic Office Chairs", your Safe Page must be an editorial or review of office chairs. Never serve unrelated junk.
• Latency Parity: If your Safe Page responds in 40ms, your Money Page must not take 4000ms to load. Optimize assets and use Cloakly’s local zero-redirect integration to maintain identical latency profiles.
Avoid Redirects (Zero-Redirect Supremacy)
In 2026, ad review bots flag HTTP 301/302 redirects with extreme scrutiny. Whenever an ad points to domain-a.com and immediately redirects via HTTP header to domain-b.com, Google’s automated compliance pipeline triggers a full site re-evaluation.
Always use Cloakly’s Local File action or Reverse Proxy action. The visitor remains on your approved domain while the monetized landing page is served directly.
Facebook Pixel & Conversions API (CAPI) Hygiene
Avoid firing aggressive conversion events (e.g. Purchase or Lead) on your Safe Page, as this signals unnatural conversion behavior to Meta's machine learning algorithms.
- Place standard
PageViewevents on your Safe Page to maintain account activity. - Fire deep funnel conversion events (
InitiateCheckout,Purchase) exclusively on your Money Page and via Meta CAPI server-to-server endpoints.
13. REST API
Cloakly provides a robust, predictable REST API for agency automation, programmatic stream deployment, automated blacklist management, and client reporting synchronization.
Authentication
Authenticate all HTTP API requests by providing your API Key via the standard Authorization bearer header:
Authorization: Bearer ck_live_9a87d6e5c4b3a210fedcba9876543210
Collections & Endpoints Overview
| Endpoint | HTTP Method | Description |
|---|---|---|
/api/v1/streams |
GET, POST | List active streams or deploy a new campaign stream. |
/api/v1/streams/{id} |
GET, PUT, DELETE | Inspect, update settings/modes, or delete an existing stream. |
/api/v1/streams/{id}/download |
GET | Programmatically download pre-configured index.php script. |
/api/v1/reports/clicks |
GET | Query granular click logs with filters (geo, risk, date, decision). |
/api/v1/account |
GET | Retrieve account quota, subscription status, and credit balance. |
/api/v1/lists/ip |
GET, POST, DELETE | Manage global or stream-level IP CIDR blacklists and whitelists. |
Managing Streams (API Example)
Deploy a new campaign stream programmatically via cURL:
curl -X POST https://cloakly.pro/api/v1/streams \
-H "Authorization: Bearer ck_live_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Google Ads - Solar US",
"mode": "review",
"real_url": "https://solar-quote.com/landing",
"safe_url": "https://solar-editorial.com/article",
"countries": ["US"],
"action_type": "redirect",
"enable_fingerprint": true
}'
Integration PHP Files Download API
Automate your server provisioning by fetching the stream client directly via CLI:
curl -s -H "Authorization: Bearer ck_live_YOUR_TOKEN" \
https://cloakly.pro/api/v1/streams/cmp_984129/download \
-o /var/www/html/index.php
Guest Access to Reporting
Create shareable, read-only analytics URLs for agency clients or media buyer partners. Guest tokens restrict access strictly to designated streams and redact sensitive affiliate offer parameters.
Reporting API
Fetch click records in JSON format for ingestion into Google BigQuery, Tableau, or custom dashboards:
curl "https://cloakly.pro/api/v1/reports/clicks?stream_id=cmp_984129&decision=allow&limit=100" \
-H "Authorization: Bearer ck_live_YOUR_TOKEN"
Account Information
Query quota limits, active plan details, and remaining monthly clicks:
{
"plan": "Enterprise",
"monthly_limit": 1000000,
"clicks_used": 284102,
"active_streams": 18,
"status": "active"
}
IP/ASN Lists Management API
Bulk add or remove CIDR blocks and ASNs to your account-wide blacklist:
curl -X POST https://cloakly.pro/api/v1/lists/ip \
-H "Authorization: Bearer ck_live_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"action": "blacklist",
"entries": ["192.0.2.0/24", "198.51.100.14"],
"note": "Aggressive crawler cluster"
}'