Skip to content

Commit be8e33c

Browse files
committed
added Google Analytics tracking code to the HTML files.
1 parent a9fa406 commit be8e33c

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

utils/gen-html-index-cn.pl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,19 @@
2525
<head>
2626
<title>agentzh 的 Nginx 教程(版本 $ver)</title>
2727
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
28+
<script type="text/javascript">
29+
30+
var _gaq = _gaq || [];
31+
_gaq.push(['_setAccount', 'UA-24724965-1']);
32+
_gaq.push(['_trackPageview']);
33+
34+
(function() {
35+
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
36+
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
37+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
38+
})();
39+
40+
</script>
2841
</head>
2942
<body><h2>agentzh 的 Nginx 教程(版本 $ver)</h2>
3043
<h3>目录</h3>

utils/gen-html-index-en.pl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,19 @@
2626
<title>agentzh's Nginx Tutorials (version $ver)</title>
2727
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
2828
<link rel="stylesheet" href="tutorial.css"/>
29+
<script type="text/javascript">
30+
31+
var _gaq = _gaq || [];
32+
_gaq.push(['_setAccount', 'UA-24724965-1']);
33+
_gaq.push(['_trackPageview']);
34+
35+
(function() {
36+
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
37+
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
38+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
39+
})();
40+
41+
</script>
2942
</head>
3043
<body><h2>agentzh's Nginx Tutorials (version $ver)</h2>
3144
<h3>Table of Contents</h3>

0 commit comments

Comments
 (0)