(param)
| 86 | } |
| 87 | |
| 88 | stopTimer (param) { |
| 89 | if (param == null) { param = { } } |
| 90 | let { subtractTimeout, clearName } = param |
| 91 | if (subtractTimeout == null) { subtractTimeout = false } |
| 92 | if (clearName == null) { clearName = false } |
| 93 | clearTimeout(this.awayTimeoutId) |
| 94 | if (this.running) { |
| 95 | this.running = false |
| 96 | this.endTime = subtractTimeout ? this.lastActive : window.performance.now() |
| 97 | const timeViewed = this.endTime - this.startTime |
| 98 | if (timeViewed > this.throttleRate) { // Prevent event spam when triggered in rapid succession |
| 99 | window.tracker.trackEvent('Premium Feature Viewed', { featureData: this.featureData, timeViewed }) |
| 100 | } |
| 101 | } |
| 102 | if (clearName) { this.featureData = null } |
| 103 | } |
| 104 | |
| 105 | markLastActive () { |
| 106 | this.lastActive = window.performance.now() |
no test coverage detected