Mess around more with analytics tag
This commit is contained in:
parent
18bfc4b0c5
commit
b2de596342
|
@ -15,7 +15,10 @@ const host = process.env.HOST || "localhost";
|
|||
const port = parseInt(process.env.PORT || "") || 6119;
|
||||
const tlsPort = parseInt(process.env.TLS_PORT || "") || 6120;
|
||||
const useTLS = process.env.TLS ? true : false;
|
||||
const analyticsTag = process.env.ANALYTICS_TAG || "";
|
||||
const analyticsTag = (process.env.ANALYTICS_TAG || "").replace(
|
||||
/^'(.+)'$/,
|
||||
"$1"
|
||||
);
|
||||
|
||||
const langs = await langsPromise;
|
||||
const app = express();
|
||||
|
|
|
@ -264,8 +264,9 @@ enable all the fun CloudFlare options you'd like.
|
|||
## Set up analytics (optional)
|
||||
|
||||
Sign up for Fathom Analytics, enter your domain name, and get a tag
|
||||
for embedding. Set this as `ANALYTICS_TAG` in your `.env` file (don't
|
||||
forget the appropriate quoting), and build and roll out a new web AMI.
|
||||
for embedding. Set this as `ANALYTICS_TAG` in your `.env` file (use
|
||||
single quoting, as Makefile handling of quotes is a bit nonstandard),
|
||||
and build and roll out a new web AMI.
|
||||
|
||||
## Set up monitoring (optional)
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
</script>
|
||||
<script src="/js/app.js" defer></script>
|
||||
<% if (analyticsTag) { %>
|
||||
<%= analyticsTag %>
|
||||
<%- analyticsTag %>
|
||||
<% } %>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
<meta charset="utf-8" />
|
||||
<title>Riju</title>
|
||||
<link rel="stylesheet" href="/css/index.css" />
|
||||
<% if (analyticsTag) { %>
|
||||
<%- analyticsTag %>
|
||||
<% } %>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Riju: <i>fast</i> online playground for every programming language</h1>
|
||||
|
@ -30,8 +33,5 @@
|
|||
<% } else { %>
|
||||
<i>Riju is loading language configuration...</i>
|
||||
<% } %>
|
||||
<% if (analyticsTag) { %>
|
||||
<%= analyticsTag %>
|
||||
<% } %>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue