@@ -3,8 +3,8 @@ | |||
{{ partial "head.html" . }} | |||
<body> | |||
<p> This page does not exist or as they say, it's a 404 error</p> | |||
<p> If you can't find what you're looking for, it's better to sometimes look inside </p> | |||
<p> Oops! Can't find that page. Sorry!</p> | |||
{{ partial "freshlyticsscript.html" . }} | |||
</body> | |||
</html> |
@@ -14,6 +14,8 @@ | |||
{{ partial "listing.html" . }} | |||
{{ end }} | |||
</div> | |||
{{ partial "freshlyticsscript.html" . }} | |||
</body> | |||
</html> |
@@ -12,4 +12,6 @@ | |||
{{ partial "footer.html" . }} | |||
{{ partial "freshlyticsscript.html" . }} | |||
</html> |
@@ -39,7 +39,7 @@ | |||
<h3><a href="posts/">View all posts</a></h3> | |||
</div> | |||
{{ partial "freshlyticsscript.html" . }} | |||
</body> | |||
</html> |
@@ -0,0 +1,31 @@ | |||
<!-- freshlytics snippet --> | |||
<script> | |||
(function() { | |||
var COLLECT_URL = "https://analytics.roxanne.dev/api/collect"; | |||
var PROJECT_ID = "ZUYYDNTR9E"; | |||
var GLOBAL_VAR_NAME = "__freshlytics__"; | |||
window[GLOBAL_VAR_NAME] = {}; | |||
window[GLOBAL_VAR_NAME].sendPageView = function() { | |||
var path = location.pathname; | |||
var referrer = document.referrer; | |||
var url = | |||
COLLECT_URL + | |||
"?project_id=" + | |||
PROJECT_ID + | |||
"&path=" + | |||
encodeURIComponent(path) + | |||
"&referrer=" + | |||
encodeURIComponent(referrer); | |||
var xhr = new XMLHttpRequest(); | |||
xhr.open("GET", url); | |||
xhr.send(); | |||
}; | |||
window[GLOBAL_VAR_NAME].sendPageView(); | |||
})(); | |||
</script> |