Merge branch 'record-invitation-followthrough' into 'dev'

Record invitation followthrough

See merge request keanuapp/keanuapp-weblite!111
This commit is contained in:
N Pex 2022-11-02 14:11:22 +00:00
commit aae5170378
2 changed files with 8 additions and 2 deletions

View file

@ -15,7 +15,7 @@
"type": "ci", "type": "ci",
"config": { "config": {
"server": "https://metrics.cleaninsights.org/cleaninsights.php", "server": "https://metrics.cleaninsights.org/cleaninsights.php",
"siteId": 14, "siteId": 25,
"timeout": 5, "timeout": 5,
"persistEveryNTimes": 1, "persistEveryNTimes": 1,
"debug": true, "debug": true,
@ -36,7 +36,7 @@
"type": "matomo", "type": "matomo",
"config": { "config": {
"server": "https://metrics.cleaninsights.org/", "server": "https://metrics.cleaninsights.org/",
"siteId": "17" "siteId": "25"
} }
} }
] ]

View file

@ -381,6 +381,7 @@ export default {
.then( .then(
function (ignoreduser) { function (ignoreduser) {
console.log("Join: joining room"); console.log("Join: joining room");
this.$analytics.event("Invitations", "Room Joined");
this.loadingMessage = this.$t("join.status_joining"); this.loadingMessage = this.$t("join.status_joining");
return this.$matrix.matrixClient.joinRoom(this.roomId); return this.$matrix.matrixClient.joinRoom(this.roomId);
}.bind(this) }.bind(this)
@ -422,6 +423,11 @@ export default {
Math.floor(Math.random() * this.availableAvatars.length) 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() { destroyed() {
this.$matrix.off("Room.myMembership", this.onMyMembership); this.$matrix.off("Room.myMembership", this.onMyMembership);