Skip to content

Loading…

Add Google Analytics script, adjust script tag indentation #11

Merged
merged 1 commit into from

1 participant

@rbishop
Owner

No description provided.

@rbishop rbishop merged commit dad0451 into master
@rbishop rbishop deleted the google-analytics branch
@rbishop rbishop referenced this pull request
Closed

Google Analytics #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Showing with 19 additions and 8 deletions.
  1. +19 −8 _layouts/pure.html
View
27 _layouts/pure.html
@@ -46,14 +46,25 @@ <h2 class="brand-tagline">{{ site.description }}</h2>
</div>
</div>
</div>
- <script type="text/javascript">
- var links = document.getElementsByTagName('a');
- for (var i = 0, len = links.length; i < len; i++) {
- var link = links[i];
- if (link.hostname !== window.location.hostname) {
- link.target = "_blank";
+ <script type="text/javascript">
+ var links = document.getElementsByTagName('a');
+ for (var i = 0, len = links.length; i < len; i++) {
+ var link = links[i];
+ if (link.hostname !== window.location.hostname) {
+ link.target = "_blank";
+ }
}
- }
- </script>
+ </script>
+ <script type="text/javascript">
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-39934812-1']);
+ _gaq.push(['_trackPageview']);
+
+ (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>
Something went wrong with that request. Please try again.