Skip to content

Commit f2e29d7

Browse files
committed
Whoops!
Make _gaq a global variable
1 parent c6f78ab commit f2e29d7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

split.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// (c) 2011 Andrew Nesbitt [andrewnez@gmail.com]
55
// released under the MIT license
66

7+
var _gaq = _gaq || []
8+
79
Split = (function(){
810

911
var config = {},
@@ -70,7 +72,6 @@ Split = (function(){
7072
alternative = keys[Math.floor(Math.random()*keys.length)]
7173
createCookie(config.cookieName, alternative, config.cookieAge)
7274
}
73-
var _gaq = _gaq || [];
7475
_gaq.push(['_setCustomVar', config.customVariableIndex, config.customVariableName, alternative, 1]);
7576
alternatives[alternative]();
7677
}

0 commit comments

Comments
 (0)