Outclicks Pepper hack

I have started using Shaun Inman’s fabulous Mint stats package for about a month and half. It’s a great app. One of the really cool things about Mint is Pepper, Mint’s plugin API. There is an emerging Pepper plugin community out there. One Pepper that intrigued me was Outclicks by Andrew Sutherland. It works fantastic for any site that is on the main domain of the Mint install.

A problem with it is it does not work on sites reporting to Mint from a subdomain, like mine. The reason for this is Outclicks uses the XMLHTTPRequest object. In Internet Explorer and Firefox<1.5 the XMLHTTPRequest object can not call a page across subdomains. Well never one to let a problem hold me down I created a work around. My work around uses a PHP proxy file placed in the subdomain. The proxy file uses CURL to call the data.php file of the Outclicks Pepper which avoids the XMLHTTPRequest object problem. The other modification is in the Outclicks script.php file to point at the proxy file. Now I suppose I could have just put CURL in the script.php file but I wanted to preserve as much of the Outclicks file as possible. This is not an endorsed solution by Andrew and will likely break or be broken by any future Outclicks release. Download a .zip containing the files.


  1. Download the outclickshack.zip file and uncompress
  2. Open the proxy.php file and modify line ten to point at your Mint install
  3. Upload the proxy.php file to the subdomain you want to start tracking
  4. Upload the script.php file to the /mint/pepper/andrewsutherland/outclicks/ folder replacing the file already there
  5. Your finished!

If you have any problems please feel free to contact me through comments.

2 Responses to “Outclicks Pepper hack”

  1. Jason Says:

    Hi there,

    I cannot get this pepper to work on the main domain let alone a subdomain. It installed correctly and files are all there. When I look in php admin, I can see a table structure but there are no records inside.
    I realise you are not the developer but do you have any suggestions

  2. Jason Says:

    Thanks for getting back to me. Outclicks is working now but will not display all the characters in my blog title.

    My site is titled: ???????
    but all I get is ?????…
    You can check it out here: http://www.jasonnewton.net/mint/

    Thanks for your time.