Skip to content

Commit 17ae9e6

Browse files
claydiffrientpassy
authored andcommitted
feat(gen): Change ga.js to analytics.js
Updates the script to the new Google recommended script.
1 parent e1cb206 commit 17ae9e6

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

templates/common/index.html

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,15 @@
2424
<!-- Add your site or application content here -->
2525
<div class="container" ng-view></div>
2626

27-
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
28-
<script>
29-
var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']];
30-
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
31-
g.src='//www.google-analytics.com/ga.js';
32-
s.parentNode.insertBefore(g,s)}(document,'script'));
27+
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID -->
28+
<script>
29+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
30+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
31+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
32+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
33+
34+
ga('create', 'UA-XXXXX-X');
35+
ga('send', 'pageview');
3336
</script>
3437

3538
<script src="bower_components/jquery/jquery.js"></script>

0 commit comments

Comments
 (0)