mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
Google Analytics - basic page tracking for docs
This commit is contained in:
parent
2da07127e4
commit
350ee31107
2 changed files with 15 additions and 1 deletions
|
|
@ -47,7 +47,8 @@ function DocsController($location, $browser, $window) {
|
|||
|
||||
this.afterPartialLoaded = function() {
|
||||
SyntaxHighlighter.highlight();
|
||||
window.scrollTo(0,0);
|
||||
$window.scrollTo(0,0);
|
||||
$window._gaq.push(['_trackPageview', $location.hashPath.replace('!', '/')]);
|
||||
};
|
||||
|
||||
this.getFeedbackUrl = function() {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,10 @@
|
|||
<link rel="stylesheet" href="docs-combined.css" type="text/css"/>
|
||||
<link rel="stylesheet" href="syntaxhighlighter/syntaxhighlighter-combined.css" type="text/css"/>
|
||||
<script>
|
||||
// GA asynchronous tracker
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-8594346-3']);
|
||||
|
||||
/*!
|
||||
* $script.js v1.3
|
||||
* https://github.com/ded/script.js
|
||||
|
|
@ -84,5 +88,14 @@
|
|||
<br class="clearFloat" />
|
||||
<div id="twoColFooter">© 2010-2011 angular</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
// lazy load GA asynchronous tracker
|
||||
(function() {
|
||||
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';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Reference in a new issue