Permalink
Browse files

Merge branch 'develop'

  • Loading branch information...
2 parents d231612 + d91cafe commit 338150004b7278295161318d94e67c3f5aa7dbf0 @eduardocereto eduardocereto committed May 11, 2012
Showing with 11 additions and 12 deletions.
  1. +1 −1 Makefile
  2. +1 −2 src/core.js
  3. +1 −1 src/header.js
  4. +2 −1 src/plugins/mailto.js
  5. +1 −1 src/plugins/outbound.js
  6. +4 −5 src/plugins/youtube.js
  7. +1 −1 test/test_video.html
View
@@ -3,7 +3,7 @@
CLOSURE_COMPILER = java -jar ~/compiler.jar --compilation_level ADVANCED_OPTIMIZATIONS
#CLOSURE_COMPILER = java -jar ~/compiler.jar --compilation_level ADVANCED_OPTIMIZATIONS --formatting PRETTY_PRINT
#CLOSURE_COMPILER = java -jar ~/compiler.jar --formatting PRETTY_PRINT
-UGLIFYJS = uglifyjs -v
+UGLIFYJS = uglifyjs --ascii -v
# http://code.google.com/closure/utilities/index.html
CLOSURE_LINTER = gjslint
View
@@ -30,7 +30,6 @@ var document = window.document,
slice = Array.prototype.slice,
trim = String.prototype.trim,
sindexOf = String.prototype.indexOf,
- aindexOf = Array.prototype.indexOf,
url = document.location.href,
documentElement = document.documentElement;
@@ -40,7 +39,7 @@ var document = window.document,
*/
function GAS() {
var self = this;
- self['version'] = '1.6';
+ self['version'] = '1.8';
self._accounts = {};
self._accounts_length = 0;
self._queue = _prev_gas;
View
@@ -1,5 +1,5 @@
/**
- * @preserve Copyright 2011, Cardinal Path and DigitalInc
+ * @preserve Copyright 2011, Cardinal Path and DigitalInc.
*
* GAS - Google Analytics on Steroids
* https://github.com/CardinalPath/gas
View
@@ -27,7 +27,8 @@ var _gasTrackMailto = function(opts) {
this._liveEvent('a', 'mousedown', function(e) {
var el = e.target;
- if (el && el.href && el.href.toLowerCase().indexOf('mailto:') === 0) {
+ if (el && el.href && el.href.toLowerCase &&
+ sindexOf.call(el.href.toLowerCase(), 'mailto:') === 0) {
_gas.push(['_trackEvent', opts['category'], el.href.substr(7)]);
}
});
View
@@ -32,7 +32,7 @@ var _gasTrackOutboundLinks = function(opts) {
var l = this;
if (
(l.protocol == 'http:' || l.protocol == 'https:') &&
- sindexOf.call(l.href, document.location.hostname) === -1)
+ sindexOf.call(l.hostname, document.location.hostname) === -1)
{
var path = (l.pathname + l.search + ''),
utm = sindexOf.call(path, '__utm');
View
@@ -210,12 +210,11 @@ var _gasTrackYoutube = function(opts) {
var args = slice.call(arguments);
if (args[0] && (typeof args[0] === 'boolean' || args[0] === 'force')) {
opts = {'force': !!args[0]};
- }else {
- opts = {};
- }
- if (args[1] && args[1].length) {
- opts['percentages'] = args[1];
+ if (args[1] && args[1].length) {
+ opts['percentages'] = args[1];
+ }
}
+
opts = opts || {};
opts['force'] = opts['force'] || false;
opts['category'] = opts['category'] || 'YouTube Video';
View
@@ -6,7 +6,7 @@
_gas.push(['_setAccount', 'UA-YYYYYY-Y']);
_gas.push(['_trackPageview', '/test']);
_gas.push(['_gasTrackVideo']);
- _gas.push(['_gasTrackYoutube', 'force', [25, 50, 75, 90, 99, 100]]);
+ _gas.push(['_gasTrackYoutube', {force:true, percentages: [25, 50, 75, 90, 99, 100]}]);
_gas.push(['_gasTrackVimeo', {
force:'force',
percentages: [25, 50, 75, 90, 99, 100]

0 comments on commit 3381500

Please sign in to comment.