Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add Google Analytics script, adjust script tag indentation #11

Merged
merged 1 commit into from

1 participant

Richard B
Richard B
Owner

No description provided.

Richard B rbishop merged commit dad0451 into from
Richard B rbishop deleted the branch
Richard B 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
This page is out of date. Refresh to see the latest.
Showing with 19 additions and 8 deletions.
  1. +19 −8 _layouts/pure.html
27 _layouts/pure.html
View
@@ -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.