1. Prepare the PHP file
Createmetricanic-guard.php beside your landing’s index.php. Copy the code below into it. Open Profile → Security → LP protection key, click Copy, and replace PASTE_YOUR_LP_PROTECTION_KEY in that PHP file with the copied secret.
Keep the secret in PHP on your server. The public landing URL gets a generated key, never the secret from your profile.
Copy the PHP protection file
Copy the PHP protection file
2. Add one line before the page HTML
Put this at the very beginning ofindex.php, before any HTML, spaces, or other output:
index.html, serve it as index.php on PHP hosting and update the landing URL if necessary. Remove the old public HTML copy after verifying the PHP page, otherwise it remains an unprotected way to open the same content.
For a CMS or page builder, add the PHP file to its server-side page template.
3. Add the key to the landing URL
Edit the landing in Metricanic and set its URL to:&lp_key={lp_key} if the URL already has a query string. Select the landing in your campaign’s rotator, save, and enter through Tracking link.
Disable shared HTML caching for this page and clear existing cached copies. If your hosting uses a proxy, preserve the visitor’s User-Agent header.
Check that it works
If every request fails, check the copied secret, PHP execution, server time, and User-Agent forwarding. If the bare page still opens, check for an old HTML copy or a cached response.