fix async behaviour, tracking should maybe use Async Piwik tracker

events before piwik loads are lost currently
blocking for piwik would be stupid.

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/21833/head
Michael Telatynski 2017-05-29 14:56:41 +01:00
parent f5d336103e
commit 75e386e0ee
1 changed files with 2 additions and 3 deletions

View File

@ -32,9 +32,7 @@ class Analytics {
* otherwise try and initalize, no-op if piwik config missing
*/
enable() {
if (this.tracker || this._init()) {
this.disabled = false;
}
if (!this.tracker) this._init();
}
/**
@ -71,6 +69,7 @@ class Analytics {
}
_set(tracker) {
this.disabled = false;
this.tracker = tracker;
this.tracker.discardHashTag(false);
this.tracker.enableHeartBeatTimer();