Ensure the page URL is redacted before tracking analytics events

Sometimes the page URL isn't redacted, so we manually set it to be redacted prior to tracking the event. This isn't entirely documented by piwik, but having looked at the requests leaving the browser it seems to fix the issue.
This commit is contained in:
Travis Ralston 2019-04-04 10:52:54 -06:00
parent d45f43144f
commit 7e96d493c9

View file

@ -201,6 +201,7 @@ class Analytics {
trackEvent(category, action, name, value) { trackEvent(category, action, name, value) {
if (this.disabled) return; if (this.disabled) return;
this._paq.push(['setCustomUrl', getRedactedUrl()]);
this._paq.push(['trackEvent', category, action, name, value]); this._paq.push(['trackEvent', category, action, name, value]);
} }