Last active
December 14, 2015 01:09
Revisions
-
stugoo revised this gist
Feb 21, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,7 @@ SDM.track = function (args) { }; (function (Modernizr) { var trackpasses = true, trackfails = true, trackFeature = function (results) { -
stugoo revised this gist
Feb 21, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -48,4 +48,4 @@ SDM.track = function (args) { if( trackpasses || trackfails) return log(); })(Modernizr); -
stugoo revised this gist
Feb 21, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -41,8 +41,8 @@ SDM.track = function (args) { tests.failed.push(d); } tests.passed = tests.passed.join("|"); tests.failed = tests.failed.join("|"); trackFeature(tests); }; -
stugoo revised this gist
Feb 21, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,10 +20,10 @@ SDM.track = function (args) { trackfails = true, trackFeature = function (results) { if (trackpasses && results.passed.length > 0) SDM.track({ category: 'modernizr', action: 'passes', label: results.passed }); if (trackfails && results.failed.length > 0) SDM.track({ category: 'modernizr', action: 'fails', label: results.failed }); }, -
stugoo revised this gist
Feb 21, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,10 +20,10 @@ SDM.track = function (args) { trackfails = true, trackFeature = function (results) { if (trackpasses || results.passed.length > 0) SDM.track({ category: 'modernizr', action: 'passes', label: results.passed }); if (trackfails || results.failed.length > 0) SDM.track({ category: 'modernizr', action: 'fails', label: results.failed }); }, -
stugoo revised this gist
Feb 21, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -37,7 +37,7 @@ SDM.track = function (args) { if(Modernizr[d] && trackpasses) tests.passed.push(d); else if ( trackfails ) tests.failed.push(d); } -
stugoo revised this gist
Feb 21, 2013 . 1 changed file with 6 additions and 7 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,15 +17,14 @@ SDM.track = function (args) { (function (Modernizr, GoogleAnalyticsQueue) { var trackpasses = true, trackfails = true, trackFeature = function (results) { if (trackpasses) SDM.track({ category: 'modernizr', action: 'passes', label: results.passed }); if (trackfails) SDM.track({ category: 'modernizr', action: 'fails', label: results.failed }); }, log = function() { -
stugoo revised this gist
Feb 21, 2013 . 1 changed file with 20 additions and 20 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,7 @@ var SDM = SDM || {}; SDM.track = function (args) { args = args || {}; var category = args.category, @@ -21,14 +16,16 @@ NS.track = function (args) { (function (Modernizr, GoogleAnalyticsQueue) { var trackpasses = true, trackfails = true, trackFeature = function (results) { console.log(results); if (trackpasses) SDM.track({ category: 'modernizr', action: 'passes', label: results.passed }); if (trackfails) SDM.track({ category: 'modernizr', action: 'fails', label: results.failed }); }, log = function() { @@ -39,14 +36,17 @@ NS.track = function (args) { if(typeof Modernizr[d] === 'array') continue; if(typeof Modernizr[d] === 'object') continue; if(Modernizr[d] && trackpasses) tests.passed.push(d); if ( trackfails ) tests.failed.push(d); } tests.passed = tests.passed.join(); tests.failed = tests.failed.join(); trackFeature(tests); }; if( trackpasses || trackfails) return log(); })(Modernizr, _gaq); -
stugoo revised this gist
Feb 21, 2013 . 2 changed files with 52 additions and 21 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,52 @@ /* .track via @adamcbrewer modernizr from http://jsfiddle.net/ejL3Q/3/ */ var NS = NS || {}; NS.track = function (args) { args = args || {}; var category = args.category, action = args.action, label = args.label, value = args.value || null; if (_gaq) { _gaq.push(['_trackEvent', category, action, label, value]); } }; (function (Modernizr, GoogleAnalyticsQueue) { var trackFeature = function (testName, testResult) { var result = (testResult) ? 'Yes' : 'No'; NS.track({ category: 'modernizr', action: testName, label: result }); }, log = function() { var tests = {passed: [], failed: [] }; for(d in Modernizr) { if(typeof Modernizr[d] === 'function') continue; if(typeof Modernizr[d] === 'array') continue; if(typeof Modernizr[d] === 'object') continue; if(Modernizr[d]) tests.passed.push(d); else tests.failed.push(d); trackFeature(d, Modernizr[d]); } return tests; }; return log(); })(Modernizr, _gaq); This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,21 +0,0 @@ -
stugoo revised this gist
Feb 20, 2013 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,4 +17,5 @@ track({ category: 'Deed', action: 'Submit', label: '' value: '' // Optional }); -
stugoo revised this gist
Feb 20, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ track = function (args) { value = args.value || null; if (_gaq) { _gaq.push(['_trackEvent', category, action, label,value]); } }; -
stugoo revised this gist
Feb 20, 2013 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,7 @@ track = function (args) { var category = args.category, action = args.action, label = args.label; value = args.value || null; if (_gaq) { _gaq.push(['_trackEvent', category, action, label]); -
stugoo revised this gist
Feb 20, 2013 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,4 @@ /* via @adamcbrewer */ track = function (args) { args = args || {}; console.log(args); -
stugoo created this gist
Feb 20, 2013 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ track = function (args) { args = args || {}; console.log(args); var category = args.category, action = args.action, label = args.label; if (_gaq) { _gaq.push(['_trackEvent', category, action, label]); } }; /*usage */ track({ category: 'Deed', action: 'Submit', label: '' });