Merge pull request #1770 from matrix-org/t3chguy/piwik_disable_hbtimer

Use undocumented piwik cmd to disable heartbeattimer
This commit is contained in:
David Baker 2018-03-20 10:41:52 +00:00 committed by GitHub
commit 4b762b32ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -92,6 +92,10 @@ class Analytics {
*/
disable() {
this.trackEvent('Analytics', 'opt-out');
// disableHeartBeatTimer is undocumented but exists in the piwik code
// the _paq.push method will result in an error being printed in the console
// if an unknown method signature is passed
this._paq.push(['disableHeartBeatTimer']);
this.disabled = true;
}