From b5993e821d5cac5704bab624bbaf44d2ee3635ae Mon Sep 17 00:00:00 2001 From: John Hess Date: Wed, 10 Aug 2022 18:01:58 -0500 Subject: [PATCH 1/2] Record events when an invitation is shown to a user and when they join the room --- src/components/Join.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/Join.vue b/src/components/Join.vue index ceed40f..0a9a762 100644 --- a/src/components/Join.vue +++ b/src/components/Join.vue @@ -381,6 +381,7 @@ export default { .then( function (ignoreduser) { console.log("Join: joining room"); + this.$analytics.event("Invitations", "Room Joined"); this.loadingMessage = this.$t("join.status_joining"); return this.$matrix.matrixClient.joinRoom(this.roomId); }.bind(this) @@ -422,6 +423,11 @@ export default { Math.floor(Math.random() * this.availableAvatars.length) ] ); + // mounted() is called more than once, so multiple instances of this event + // do not necessarily indicate a user was shown the join page more than once. + // To analyze this data, segment users into those who have an "Invitations" + // action and set up conversion tracking triggered by Room Joined (once per visit). + this.$analytics.event("Invitations", "Join Page Shown"); }, destroyed() { this.$matrix.off("Room.myMembership", this.onMyMembership); From b84651dbfa92520950f7dcc2132fb4d5ef125628 Mon Sep 17 00:00:00 2001 From: John Hess Date: Wed, 10 Aug 2022 18:02:31 -0500 Subject: [PATCH 2/2] point analytics config to a testing siteId so they do not pollute production data during local dev. --- src/assets/config.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/assets/config.json b/src/assets/config.json index ff4e750..389e901 100644 --- a/src/assets/config.json +++ b/src/assets/config.json @@ -15,7 +15,7 @@ "type": "ci", "config": { "server": "https://metrics.cleaninsights.org/cleaninsights.php", - "siteId": 14, + "siteId": 25, "timeout": 5, "persistEveryNTimes": 1, "debug": true, @@ -36,7 +36,7 @@ "type": "matomo", "config": { "server": "https://metrics.cleaninsights.org/", - "siteId": "17" + "siteId": "25" } } ]