Skip to content
This repository has been archived by the owner. It is now read-only.
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

This Project is No Longer Supported

This project will no longer developed or supported.


See How Often Users Print Your Webpages

Created By: Chris Holbrook

GitHub Repo

Check out the Demo: PrinTrac.php Demo

Goal: This php file tracks how often users print your web pages by using a invisible tracking image that is included in your print stylesheet.

Tested Browsers: Firefox 10-17, Safari 5.1, Chrome 17-23, Opera 11.61-12.12*, Internet Explorer 8

  • Opera Support is Unreliable

Concept and Origin: This idea is from ShopTalkShow Host Chris Coyier and a user submitted questions (Sorry I don't remember the users name) from ShopTalk Show - Episode 006 with Zoe Gillenwater


  • Download PrinTrac.php from GitHub
  • Place printrac.php into your site's image directory or anywhere you want.
  • Create a directory in the same folder named 'logs'
  • In your Print CSS file Include the following code:
	body:after, .printracphp-ie{
		background:url(path/to/printrac.php/printrac.php?track) no-repeat;
		content: url(path/to/printrac.php/printrac.php?track);
		width: 1px;
		height: 1px;
		display: block;
  • Insert the below script tag before the closing body tag of your pages.
<script src="/path/to/phptrac.php?js"></script>
  • That's it!

View Logs

To view the logs that are created by PrinTracs visits the following link:

The default log is just the raw data outputted

If you want a nicer interface go to

Check out the Demo: PrinTrac.php Demo


Get Stats on Users Printing Your Web Pages



No packages published