Skip to content

Commit 9d2065c

Browse files
author
Rafik Robeal
committed
Remove duplicate google analytics code and move it to to a separate include file
1 parent 2d26754 commit 9d2065c

File tree

3 files changed

+17
-22
lines changed

3 files changed

+17
-22
lines changed

bot.php

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,9 @@
8080
</script>
8181
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-52c507063b3a2bbd"></script>
8282

83-
<!-- Google Analytics -->
84-
<script type="text/javascript">
85-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
86-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
87-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
88-
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
89-
90-
ga('create', 'UA-330112-2', 'mantisbt.org');
91-
ga('send', 'pageview');
92-
</script>
93-
<!-- End of Google Analytics -->
83+
<?php
84+
include( 'google_analytics.php' );
85+
?>
9486

9587
</body>
9688
</html>

google_analytics.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!-- Google Analytics -->
2+
<script type="text/javascript">
3+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
4+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
5+
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+
8+
ga('create', 'UA-330112-2', 'mantisbt.org');
9+
ga('send', 'pageview');
10+
</script>
11+
<!-- End of Google Analytics -->

upgrade_browser.php

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,9 @@
8080

8181
</div>
8282

83-
<!-- Google Analytics -->
84-
<script type="text/javascript">
85-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
86-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
87-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
88-
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
89-
90-
ga('create', 'UA-330112-2', 'mantisbt.org');
91-
ga('send', 'pageview');
92-
</script>
93-
<!-- End of Google Analytics -->
83+
<?php
84+
include( 'google_analytics.php' );
85+
?>
9486

9587

9688
</body>

0 commit comments

Comments
 (0)