From 7e96d493c9882b0f10b383031271753e235eb9dd Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 4 Apr 2019 10:52:54 -0600 Subject: [PATCH] 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. --- src/Analytics.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Analytics.js b/src/Analytics.js index 44b85e4842..1bff3bdf7c 100644 --- a/src/Analytics.js +++ b/src/Analytics.js @@ -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]); }