Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
web-apps
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
web-apps
Commits
9e980562
Commit
9e980562
authored
Apr 29, 2017
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Analytics.js disable
parent
3bae8df0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
40 deletions
+44
-40
apps/common/Analytics.js
apps/common/Analytics.js
+44
-40
No files found.
apps/common/Analytics.js
View file @
9e980562
/*global Common, _gaq */
/* jshint -W116 */
/*
/*
*
*
* (c) Copyright Ascensio System Limited 2010-2017
* (c) Copyright Ascensio System Limited 2010-2017
...
@@ -29,17 +31,19 @@
...
@@ -29,17 +31,19 @@
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*
*/
*/
if
(
Common
===
undefined
)
if
(
Common
===
undefined
)
{
var
Common
=
{};
var
Common
=
{};
// jshint ignore:line
}
Common
.
component
=
Common
.
component
||
{};
Common
.
component
=
Common
.
component
||
{};
Common
.
Analytics
=
Common
.
component
.
Analytics
=
new
(
function
()
{
Common
.
Analytics
=
Common
.
component
.
Analytics
=
(
function
()
{
"
use strict
"
;
var
_category
;
var
_category
;
return
{
return
{
initialize
:
function
(
id
,
category
)
{
initialize
:
function
(
id
,
category
)
{
if
(
typeof
id
===
'
undefined
'
)
if
(
typeof
id
===
'
undefined
'
)
throw
'
Analytics: invalid id.
'
;
throw
'
Analytics: invalid id.
'
;
...
@@ -49,21 +53,21 @@ Common.component = Common.component || {};
...
@@ -49,21 +53,21 @@ Common.component = Common.component || {};
_category
=
category
;
_category
=
category
;
$
(
'
head
'
).
append
(
//
$('head').append(
'
<script type="text/javascript">
'
+
//
'<script type="text/javascript">' +
'
var _gaq = _gaq || [];
'
+
//
'var _gaq = _gaq || [];' +
'
_gaq.push(["_setAccount", "
'
+
id
+
'
"]);
'
+
//
'_gaq.push(["_setAccount", "' + id + '"]);' +
'
_gaq.push(["_trackPageview"]);
'
+
//
'_gaq.push(["_trackPageview"]);' +
'
(function() {
'
+
//
'(function() {' +
'
var ga = document.createElement("script"); ga.type = "text/javascript"; ga.async = true;
'
+
//
'var ga = document.createElement("script"); ga.type = "text/javascript"; ga.async = true;' +
'
ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";
'
+
//
'ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";' +
'
var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ga, s);
'
+
//
'var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ga, s);' +
'
})();
'
+
//
'})();' +
'
</script>
'
//
'</script>'
);
//
);
},
},
trackEvent
:
function
(
action
,
label
,
value
)
{
trackEvent
:
function
(
action
,
label
,
value
)
{
if
(
typeof
action
!==
'
undefined
'
&&
Object
.
prototype
.
toString
.
apply
(
action
)
!==
'
[object String]
'
)
if
(
typeof
action
!==
'
undefined
'
&&
Object
.
prototype
.
toString
.
apply
(
action
)
!==
'
[object String]
'
)
throw
'
Analytics: invalid action type.
'
;
throw
'
Analytics: invalid action type.
'
;
...
@@ -82,5 +86,5 @@ Common.component = Common.component || {};
...
@@ -82,5 +86,5 @@ Common.component = Common.component || {};
_gaq
.
push
([
'
_trackEvent
'
,
_category
,
action
,
label
,
value
]);
_gaq
.
push
([
'
_trackEvent
'
,
_category
,
action
,
label
,
value
]);
}
}
}
};
})();
})();
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment