Login to download the latest version of Mint and your favorite Pepper, purchase additional licenses, or post in the Forum. Don't have an account? Create one!

In Partnership with Media Temple

Mint Forum

Can mint do custom event tracking?

Shizam
Mint-less
Posted on Aug 30, '09 at 04:13 pm

I’m wondering if Mint can log/monitor/graph custom events defined by me. For instance if users are uploading files to our site can I call the mint library to record what kind of file they upload, how long it takes, if they have errors, what their OS is, how long it takes to process said file etc. Or does mint only support monitoring the default websitey stuff?

Thanks, Sam

J-P Teti
Third-Party Pepper Developer
Posted on Aug 30, '09 at 04:19 pm

Yes and no. Mint by itself can not do more then “typical websitey stuff”, but Pepper developers (such as myself) can add extra functionality. To give you an example of how far this goes, Till created a Pepper (Pepper are plugins, and Pepper is both singular and plural) that let’s you tweet from Mint. Click the Peppermilll link and you can find them.

Shizam
Mint-less
Posted on Aug 30, '09 at 04:35 pm

I poked around Pepper and it seems like with pepper you can do one of two things:

1) Change how Mint looks and/or add new things to the look/layout of mint.

2) Take the existing data Mint records and show it in different non-standard ways.

But I can’t find any doco on having mint record or show new non-standard types of data, is there any documentation on extending Mint to do this?

J-P Teti
Third-Party Pepper Developer
Posted on Aug 30, '09 at 07:53 pm

Yes there is, I couldn’t find it at first either. See the API documentation. Fire the onJavaScript() function (more info in the “Event Handlers and Methods” article) and you can load your own javascript when the Mint javascript that records hits is loaded. However, I can’t seem to find anything to do the uploading tasks you’ve described, but it’s an interesting idea. I might (emphasis on might) work on that kind of thing myself, as I may need it for something I’m working on myself. But at the moment there is nothing I can find to do the kind of stats on uploads you’ve described.

Shaun Inman
Mint/Pepper Developer
Posted on Aug 31, '09 at 10:17 am

There isn’t anything in the API specifically for tracking uploads but because Mint uses a MySQL database anything you store in a MySQL database can be accessed by a custom Pepper, processed and displayed in Mint. Mint does not limit you to just changing the appearance of the Mint interface or manipulating the data recorded by default. You’re only limited by your ingenuity and the languages at your disposal (PHP and MySQL which should be sufficient for any statistic task you can imagine).

Shizam
Mint-less
Posted on Aug 31, '09 at 05:39 pm

Guess I can have a go at the source and see what I can hack in there, thanks for the confirmation that it might in theory be possible :)

Shiz,

if you have not already, i would say take a look at the Behavior pepper. In theory it allows you to track AJAX calls, or most extra in page clicks.

I say in theory because i havn’t been able to get it to work just yet :( but if your going to go a hacking, its not a bad place to poke around.

M

You must be logged in to reply. Login above or create an account