Skip to content

Commit

Permalink
add analytics
Browse files Browse the repository at this point in the history
- add fathom analytics (https://github.com/usefathom/fathom)
  • Loading branch information
aforsythe committed Apr 1, 2019
1 parent 31431c2 commit 24b3e9c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app.R
Expand Up @@ -64,7 +64,8 @@ ui <- navbarPage(
# Modify look of horizontal rules to make them more prominent.
# If more CSS starts to get added, it would be a good idea to pull it
# out into a separate CSS file rather than putting it all inline.
tags$head(tags$style('hr {border-top: 1px solid #b3b3b3}'),
tags$head(includeScript("fathom-analytics.js"),
tags$style('hr {border-top: 1px solid #b3b3b3}'),
tags$style('.navbar-default {background-color:#5f5f5f}'),
tags$style('.navbar-default .navbar-brand:hover {color:#c79f27}'),
tags$style('.navbar-default .navbar-nav li a:hover {color:#c79f27}'),
Expand Down
11 changes: 11 additions & 0 deletions fathom-analytics.js
@@ -0,0 +1,11 @@
(function(f, a, t, h, o, m){
a[h]=a[h]||function(){
(a[h].q=a[h].q||[]).push(arguments)
};
o=f.createElement('script'),
m=f.getElementsByTagName('script')[0];
o.async=1; o.src=t; o.id='fathom-script';
m.parentNode.insertBefore(o,m)
})(document, window, '//134.209.53.137/tracker.js', 'fathom');
fathom('set', 'siteId', 'WFUAH');
fathom('trackPageview');

0 comments on commit 24b3e9c

Please sign in to comment.