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.
pull/21833/head
Travis Ralston 2019-04-04 10:52:54 -06:00
parent d45f43144f
commit 7e96d493c9
1 changed files with 1 additions and 0 deletions

View File

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