Skip to content

Instantly share code, notes, and snippets.

@tsvensen
tsvensen / colorize-svg-with-js.svg
Created May 1, 2013 16:50
Colorize svg images with javascript using the file/browser path (js): http://elbone.github.io/cdn/codepen/icon.svg#FF0000
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tsvensen
tsvensen / track.js
Last active April 4, 2023 18:52
Abstract+Extend Google Analytics Tracking
/**
* Google Analytics Tracking
*
* Abstracting Google Analytics basic _trackEvent and _trackPageview
* Easily extended to support specific use cases
*/
var TRACK = (function($) { // Yes I know, TRACK is a global variable poluting the global namespace
//////////////////////////////////////////////// Example calls (maybe not the best place for them)