aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorChristine Dodrill <me@christine.website>2019-08-19 13:48:21 -0400
committerGitHub <noreply@github.com>2019-08-19 13:48:21 -0400
commita6c66568c8b59563b64f3ad3d2d4f4a36ec53004 (patch)
treef4cc2f5094b21ba38df370f1d598c3cfd62f6671 /templates
parenteaca47ba372cd933d273fe277f724e64580e0cd7 (diff)
downloadxesite-a6c66568c8b59563b64f3ad3d2d4f4a36ec53004.tar.xz
xesite-a6c66568c8b59563b64f3ad3d2d4f4a36ec53004.zip
Pageview times experiment (#69)
* experiment: track pageview times * strictly respect do not track * oops * asdfasdfasdf * add blogpost * fix typos oops
Diffstat (limited to 'templates')
-rw-r--r--templates/blogpost.html9
1 files changed, 6 insertions, 3 deletions
diff --git a/templates/blogpost.html b/templates/blogpost.html
index c5a61c9..61a4b38 100644
--- a/templates/blogpost.html
+++ b/templates/blogpost.html
@@ -18,6 +18,9 @@
<link rel="canonical" href="https://christine.website/{{ .Link }}">
+<!-- Metrics -->
+<script src="/static/js/pageview_timer.js"></script>
+
<script type="application/ld+json">
{
"@context": "http://schema.org",
@@ -69,10 +72,10 @@ function share_on_mastodon() {
if ( !instance.startsWith("https://") && !instance.startsWith("http://") )
instance = "https://" + instance;
- // Get the current page's URL
+ // get the current page's url
var url = window.location.href;
- // Get the page title from the og:title meta tag, if it exists.
+ // get the page title from the og:title meta tag, if it exists.
var title = document.querySelectorAll('meta[property="og:title"]')[0].getAttribute("content");
// Otherwise, use the <title> tag as the title
@@ -98,7 +101,7 @@ function share_on_mastodon() {
// Open a new window at the share location
window.open(mastodon_url, '_blank');
}
-}
+ }
</script>
{{ end }}