aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/slide-deck.js19
-rw-r--r--js/slides.js6
2 files changed, 8 insertions, 17 deletions
diff --git a/js/slide-deck.js b/js/slide-deck.js
index 266de5c..f5d21c6 100644
--- a/js/slide-deck.js
+++ b/js/slide-deck.js
@@ -808,20 +808,11 @@ SlideDeck.prototype.loadTheme_ = function(theme) {
808 * @private 808 * @private
809 */ 809 */
810SlideDeck.prototype.loadAnalytics_ = function() { 810SlideDeck.prototype.loadAnalytics_ = function() {
811 var _gaq = window['_gaq'] || []; 811 window._gaq = window['_gaq'] || [];
812 _gaq.push([ '_setAccount', this.config_.settings.analytics ]); 812 window._gaq.push([ '_setAccount', this.config_.settings.analytics ]);
813 _gaq.push([ '_trackPageview' ]); 813 window._gaq.push([ '_trackPageview' ]);
814 814
815 (function() { 815 requirejs([ 'analytics' ]);
816 var ga = document.createElement('script');
817 ga.type = 'text/javascript';
818 ga.async = true;
819 ga.src = ('https:' == document.location.protocol ? 'https://ssl'
820 : 'http://www')
821 + '.google-analytics.com/ga.js';
822 var s = document.getElementsByTagName('script')[0];
823 s.parentNode.insertBefore(ga, s);
824 })();
825}; 816};
826 817
827// Polyfill missing APIs (if we need to), then create the slide deck. 818// Polyfill missing APIs (if we need to), then create the slide deck.
diff --git a/js/slides.js b/js/slides.js
index bfef324..143dac2 100644
--- a/js/slides.js
+++ b/js/slides.js
@@ -7,6 +7,8 @@ require.config({
7 'modernizr' : 'modernizr.custom.56571', 7 'modernizr' : 'modernizr.custom.56571',
8 'prettify' : 'prettify/prettify', 8 'prettify' : 'prettify/prettify',
9 'hammer' : 'hammer.min', 9 'hammer' : 'hammer.min',
10
11 'analytics' : 'https://www.google-analytics.com/ga'
10 }, 12 },
11 13
12 shim : { 14 shim : {
@@ -16,6 +18,4 @@ require.config({
16 } 18 }
17}); 19});
18 20
19require(['slide-deck'], function(someModule) { 21require(['slide-deck']);
20
21});