1
0
mirror of https://github.com/funkypenguin/geek-cookbook/ synced 2025-12-13 01:36:23 +00:00

Let's have a nicer announcement message (#93)

* Bump changelog
* Let's have a nicer announcement message
This commit is contained in:
David Young
2020-05-25 17:12:45 +12:00
committed by GitHub
parent 81d50951bf
commit 54569b9181
3 changed files with 5 additions and 40 deletions

View File

@@ -48,37 +48,4 @@
setTimeout(o.onerror = function() { c.parentNode && c.parentNode.removeChild(c); }, a); b.parentNode.insertBefore(o, b);
})('1802694484', 20000, document);
</script>
{% set analytics = config.google_analytics %}
<link rel="preconnect dns-prefetch" href="https://www.google-analytics.com">
<script type="application/javascript">
window.ga = window.ga || function() {
(ga.q = ga.q || []).push(arguments)
}
ga.l = +new Date
/* Set up integration and send page view */
ga("create", "{{ analytics[0] }}", "{{ analytics[1] }}")
ga("set", "anonymizeIp", true)
ga("send", "pageview")
/* Register handler to log search on blur */
document.addEventListener("DOMContentLoaded", function() {
if (document.forms.search) {
var query = document.forms.search.query
query.addEventListener("blur", function() {
if (this.value) {
var path = document.location.pathname;
ga("send", "pageview", path + "?q=" + this.value)
}
})
}
})
/* Send page view on document switch (instant loading, custom event) */
document.addEventListener("DOMContentSwitch", function() {
ga("send", "pageview")
})
</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
{% endblock %}