@extends('layouts.dashboard') @section('title', $campaign->name) @section('content')
← Back to campaigns Edit
{{-- Tracking link --}}

Send your traffic here. Genuine residential visitors go to your real URL; everything else is filtered.

{{-- On-page integration code --}} @php $endpoint = url('/e/'.$campaign->hash); $js = ''; $php = "1,CURLOPT_TIMEOUT=>3]);\n" . " \$d=json_decode(curl_exec(\$c),true); curl_close(\$c);\n" . " \$to=\$d[\"url\"]??\"\"; \$delay=(int)(\$d[\"delay\"]??0);\n" . " if(\$to===\"\") return;\n" . " \$here=(!empty(\$_SERVER[\"HTTPS\"])?\"https\":\"http\").\"://\".(\$_SERVER[\"HTTP_HOST\"]??\"\").strtok(\$_SERVER[\"REQUEST_URI\"]??\"\",\"?\");\n" . " if(rtrim(\$to,\"/\")===rtrim(\$here,\"/\")) return;\n" . " if(\$delay>0){ register_shutdown_function(function() use (\$to,\$delay){ echo ''; }); }\n" . " else { header(\"Location: \".\$to); exit; }\n" . "})();"; @endphp

Add the code to your landing page

Recommended instead of the link — run your ads straight to your own page and paste one of these. Genuine visitors are sent to your Allowed (real) URL (after the Redirect delay you set); everything else goes to your Filtered (safe) URL instantly.

⚠️ If your page already begins with its own <?php, paste the lines below that tag (keep only ONE <?php). This block opens PHP and does not close it, so your page's own code keeps running.

Genuine visitors go to your Allowed (real) URL; set a Filtered (safe) URL for everyone else. Tip: put this code on a landing/doorway page — don't paste it on the Allowed URL itself, or genuine visitors would be redirected in a loop. Not sure about PHP tags? Use the JavaScript option instead — it can't break your page.

@php $cards = [['Visits',$stats['hits'],'text-brand'],['Allowed',$stats['allowed'],'text-green-500'],['Filtered',$stats['filtered'],'text-red-500'],['Bots',$stats['bots'],'text-amber-500']]; @endphp @foreach($cards as [$label,$val,$color])
{{ $label }}
{{ number_format($val) }}
@endforeach
Recent traffic
@forelse($recent as $log) @empty @endforelse
IPCountryVerdictReasonWhen
{{ $log->ip }} {{ $log->country_code ?: '—' }} {{ ucfirst($log->verdict) }} {{ $log->reason }} {{ $log->created_at?->diffForHumans() }}
No traffic recorded yet.
@endsection