Skip to content

Commit

Permalink
Fix the feedback buttons event tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
vasanthv committed Jan 16, 2023
1 parent 361adf6 commit 88ee374
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions www/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,13 @@ const App = Vue.createApp({
setStyle(key, value) {
document.documentElement.style.setProperty(key, value);
},
onCallFeedback(e) {
try {
if (cabin) {
cabin.event(e.target.getAttribute("data-cabin-event"));
}
} catch (e) {}
},
exit() {
signalingSocket.close();
for (let peer_id in peers) {
Expand Down
6 changes: 3 additions & 3 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@
<div class="question italic">How was the quality of call?</div>
<div class="thankYou bold">Thank you for your feedback</div>
<div id="feedbackButtons">
<button data-cabin-event="call-quality-nah">😟<br />Nah!</button>
<button data-cabin-event="call-quality-meh">😐<br />Meh!</button>
<button data-cabin-event="call-quality-yay">😀<br />Yay!</button>
<button data-cabin-event="call-quality-nah" v-on:click="onCallFeedback">😟<br />Nah!</button>
<button data-cabin-event="call-quality-meh" v-on:click="onCallFeedback">😐<br />Meh!</button>
<button data-cabin-event="call-quality-yay" v-on:click="onCallFeedback">😀<br />Yay!</button>
</div>
</div>
</div>
Expand Down

0 comments on commit 88ee374

Please # to comment.