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>
This commit is contained in:
+2
-3
@@ -32,9 +32,7 @@ class Analytics {
|
|||||||
* otherwise try and initalize, no-op if piwik config missing
|
* otherwise try and initalize, no-op if piwik config missing
|
||||||
*/
|
*/
|
||||||
enable() {
|
enable() {
|
||||||
if (this.tracker || this._init()) {
|
if (!this.tracker) this._init();
|
||||||
this.disabled = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -71,6 +69,7 @@ class Analytics {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_set(tracker) {
|
_set(tracker) {
|
||||||
|
this.disabled = false;
|
||||||
this.tracker = tracker;
|
this.tracker = tracker;
|
||||||
this.tracker.discardHashTag(false);
|
this.tracker.discardHashTag(false);
|
||||||
this.tracker.enableHeartBeatTimer();
|
this.tracker.enableHeartBeatTimer();
|
||||||
|
|||||||
Reference in New Issue
Block a user