diff --git a/src/components/Calendar.vue b/src/components/Calendar.vue
index f6bc98f0..22c97780 100644
--- a/src/components/Calendar.vue
+++ b/src/components/Calendar.vue
@@ -71,7 +71,7 @@
{{ getDateString(new Date(event.date), new Date(event.dateEnd)) }}
-
+
{{ event.location }}
@@ -152,6 +152,9 @@ export default {
}
},
async mounted() {
+ this.$refs.container.addEventListener('click', () => {
+ window.plausible('Interact', { props: { section: 'Calendar' } })
+ }, { passive: true })
this.events = (await getEvents()).sort((a, b) => {
if (new Date(a.date) < new Date(b.date)) return -1
return 1
@@ -180,7 +183,7 @@ export default {
})
},
expand(target) {
- if (!this.expanded) {
+ if (!this.expanded && target) {
setTimeout(() => {
const bottomVisible = (window.innerHeight - target.getBoundingClientRect().bottom) > 30
if (!bottomVisible) this.$refs.container.scrollIntoView({ behavior: 'smooth', block: 'end' })
diff --git a/src/components/News.vue b/src/components/News.vue
index 177949bc..5c7dbc45 100644
--- a/src/components/News.vue
+++ b/src/components/News.vue
@@ -64,6 +64,9 @@ export default {
}
},
async mounted() {
+ this.$refs.container.addEventListener('click', () => {
+ window.plausible('Interact', { props: { section: 'News' } })
+ }, { passive: true })
this.news = (await getNews()).sort((a, b) => {
if (new Date(a.date) > new Date(b.date)) return -1
return 1