|
@@ -1,8 +1,18 @@
|
1
|
|
-/**
|
2
|
|
- * Google Analytics
|
3
|
|
- */
|
4
|
|
-(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
5
|
|
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
6
|
|
- })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
7
|
|
- ga('create', 'UA-319188-14', 'jit.si');
|
8
|
|
- ga('send', 'pageview');
|
|
1
|
+(function (ctx) {
|
|
2
|
+ function Analytics() {
|
|
3
|
+ /**
|
|
4
|
+ * Google Analytics
|
|
5
|
+ */
|
|
6
|
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
7
|
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
8
|
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
|
9
|
+ ga('create', 'UA-319188-14', 'jit.si');
|
|
10
|
+ ga('send', 'pageview');
|
|
11
|
+ }
|
|
12
|
+
|
|
13
|
+ Analytics.prototype.sendEvent = function (action, data) {
|
|
14
|
+ ga('send', 'event', 'jit.si', action);
|
|
15
|
+ };
|
|
16
|
+
|
|
17
|
+ ctx.Analytics = Analytics;
|
|
18
|
+}(window));
|