ƒ.collections - Get-Kraken/fixx GitHub Wiki

Used to store objects of the same type, e.g. fileTypes.


The ƒ.collections.fileTypes list is semi-static, as each contains a key:value pair of file type:boolean. The boolean is used to indicate to the file download indexer whether a file type should be event-tracked or not.

File type boolean values can be set after initialisation and will be checked on every file click that matches the selector of the anchors to be tracked (see ƒ.stats for further info) More file types can be added by assignment:

example:

ƒ.collections.fileTypes['newtype'] = true;

File Types

The fileTypes object contains a list of the most commonly used file types on the web and is checked when sending Google Analytics (GA) events.

fixx will not track common web file types by default (values set to false) as they are usually tracked by default by page analytics software as page views.

// office docs
'doc': true, 'docx': true, 'xls': true, 'xlsx': true, 'ppt': true, 'pptx': true, 'pps': true,

// images
'jpg': true, 'jpeg': true, 'tif': true, 'tiff': true, 'png': true, 'apng': true, 'gif': true, 'bmp': true,
'svg': true,

// text
'txt': true, 'rtf': true, 'xps': true,

// adobe
'pdf': true, 'psd': true, 'ai': true, 'eps': true,

// video
'mp4': true, 'm4a': true, 'm4p': true, 'mpg': true, 'mpeg': true, 'avi': true,
'wmv': true, 'divx': true, 'xvid': true, 'rm': true, 'flv': true, 'mkv': true, 'ogg': true, 'ogv': true,
'webm': true,
'mov': true, 'qt': true,

// audio
'wav': true, 'wma': true, 'ra': true, 'mp3': true, 'flac': true, 'oga': true,

// archives
'zip': true, 'rar': true, 'tgz': true, 'tar': true,

// web/code formats
// set to true only if you want events for normal internal links that match common web fileTypes below.
'htm': false, 'html': false, 'xhtml': false, 'shtml': false,
'asp': false, 'aspx': false, 'ascx': false,
'rss': false, 'xml': false,
'jsp': false, 'php': false, 'cfm': false,
'css': false, 'js': false