Forums » Developers

What to as URL and type for audio previews

On I've made it possible to listen to some audio files. I'd like to log it when someone does this. I know where I should do this, but not quite sure what values to use.

The clicky.log function takes a URL, Title and a Type. What should I use as URL? The URL of the stream itself is rather cryptic, and I suppose using the URL of the page they are currently at might be a bit wrong as well? The title I suppose should be the name of the song, but what about the type? Can that be anything? For example 'listen' or 'preview' or something like that?

Posted Tue Mar 6 2012 6:48a by Svis***

URL's for "events" are usually fake so you can do whatever you want. It should start with a # though, e.g. #listen. If you want to track what specific file was listened to then you'll need to use the actual URLs or convert the titles into something URL friendly.

If you just want to track people clicking them in general: clicky.log('#listen', 'Listen');

Posted Tue Mar 6 2012 3:36p by Your Friendly Clicky Admin

Tried to use the url plus a hash with the track name at the end, but seems like they are all lumped together?

Posted Tue Mar 6 2012 3:39p by Svis***

Tried to use just the track name with a hash infront, but then I got urls in clicky like title, rather than title.

Posted Tue Mar 6 2012 3:59p by Svis***

Hashes only get logged if the URL starts with a hash, otherwise we filter them out. They typically aren't meant to represent real URLs anyways. e.g. when someone clicks one of our javascript menus, say the "site" one, it gets logged to us as #menu/sites, with no reference to the page they were actually on when they clicked. We just want to track how many people are clicking it. It souds like you want to track how many people are clicking your listen links, so same idea.

Posted Wed Mar 7 2012 3:45p by Your Friendly Clicky Admin

You must be logged in to your account to post!