Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 35d4993

Browse files
committed
chore(ngdocs): disable google analytics in e2e tests
GA is not needed during e2e tests, so I'm removing it to speed up the e2e test suite. See previous commits for more info.
1 parent 705404f commit 35d4993

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

docs/src/templates/index.html

+7-5
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,13 @@
119119
_gaq.push(['_setAccount', 'UA-8594346-3']);
120120
_gaq.push(['_setDomainName', '.angularjs.org']);
121121

122-
(function() {
123-
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
124-
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
125-
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
126-
})();
122+
if (!window.RUNNING_IN_NG_TEST_RUNNER) {
123+
(function() {
124+
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
125+
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
126+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
127+
})();
128+
}
127129
</script>
128130
</head>
129131

0 commit comments

Comments
 (0)