Secure campaign integration
TrafficShield guides your setup from campaign details to filters, automation, extra protection, and final integration testing.
Integration methods
Choose the method that best fits your website stack and place the integration code into your website header or page setup.
Paste the provided PHP snippet directly into the backend of your site to protect traffic before the page loads.
Paste this at the very top of your entry file, before any HTML output:
<?php
require_once 'leadcloak-shield.php';
LeadCloak::protect('YOUR_CAMPAIGN_ID');
?>
Load the CDN script in your website header so the protection layer runs quickly and consistently.
Paste this snippet right before the closing </head> tag:
<script src="https://cdn.leadcloak.com/tracker.js"
data-campaign="YOUR_CAMPAIGN_ID"
async></script>
Upload the provided PHP package and activate the campaign through your server-side deployment.
Extract the package on your server, then include it at the top of your entry file:
<?php include_once __DIR__ . '/leadcloak/shield.php'; ?>
Install the integration snippet into your WordPress site header or plugin area for fast deployment.
Add this to your theme's functions.php file:
function leadcloak_init() {
include_once WP_CONTENT_DIR . '/leadcloak/shield.php';
}
add_action('init', 'leadcloak_init', 1);