Tracking the impression using image tag it’s playing important role, whenever you are sending email or include the image tag into another website to display your ads. It will send the parameters and get back the logs.
How Impression tracker works
Impression tracker display the image using server-side file and send back user details to server. It’s used to track your ads which display in different websites.
Let’s create simple image.html which have image tag and include image.php to display and capture logs entry.
<img src="image.php?key=1234&impression=yes" />
<?php // read image file using readfile echo readfile("image.jpg"); // get logs from the client browser // below one capture query string store into track.logs file $context = $_SERVER["QUERY_STRING"]."\n"; file_put_contents('track.logs',$context);
Once the image reached the client browser, we will get logs from it. this the way impression tracker works.