Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Ensure the page URL is redacted before tracking analytics events
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
turt2live committed Apr 4, 2019
1 parent d45f431 commit 7e96d49
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}

Expand Down

0 comments on commit 7e96d49

Please sign in to comment.