How to track a download page with google-analytics and php? <p>I have a download page in php that after performing some checks returns a file, without displaying any html:</p> <pre><code>header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename=xyz.exe'); header('Content-Transfer-Encoding: binary'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); header('Content-Length: ' . filesize(LOCAL_FILE)); readfile(LOCAL_FILE); </code></pre> <p>Now I'd like to track this page with google-analytics. What's the best way to achieve this without displaying html? </p>