MVC: Filter by `user_id_type` on default dashboards
Release notes
N/A
Problem to solve
In the initial implementation of user tracking if users had not consented to cookie tracking they were counted as the same user. This results in results that are nonsensical or hard to interpret on the Audience Dashboard.
Our long term our vision is to include more filters for the data in a method consistent with other UX in the GitLab platform.
Proposal
On the backend this is being resolved in https://gitlab.com/gitlab-org/analytics-section/product-analytics/gl-application-sdk-browser/-/issues/38.
In the dashboards we want to allow users to view only users that have given consent to trust they are really unique users.
Toggle text - Exclude anonymous users.
, followed by a ?
/i
tooltip that explains View metrics representing only users who have consented to activity tracking, excluding anonymous users.
Toggle UX - No
by default.
Placement: Put on all Product Analytics dashboards, built in and custom. Make sure this is NOT on the Value Stream Dashboard.
Also add an explanation in the documentation for the dashboards.
Intended users
Both of these users are viewing the Audience dashboard to understand how usage of their application is changing over time.
Feature Usage Metrics
N/A - captured already in WAU of dashboard views.
Does this feature require an audit event?
No
frontend - 2️⃣
Implementation plan - - Add toggle to the UI with a tooltip explaining its usage.
- Remember the toggle through the URI parameters.
- Remember to exclude this toggle from VSA dashboards.
- Update the query sent to the Cube proxy to include/exclude anonymous users based upon whether the toggle is disabled/enabled.
- To exclude anonymous users, the following needs to be added to the query sent:
segments: [ "TrackedEvents.knownUsers" ]
- To exclude anonymous users, the following needs to be added to the query sent:
- Use deprecated snowplow tracking (because of additional props) to monitor when this feature is toggled.
- The event should send the usual GitLab context (happens by default), along with:
- Dashboard title.
- Whether the user removed anonymized users or added them.
- For example:
this.trackEvent('click_toggle', { label: 'exclude_anonymised_users', property: value, # Whether the toggle is enabled or not - true/false extra: { dashboard_title: dashboard.title, }, });
- The event should send the usual GitLab context (happens by default), along with:
- Add unit tests.
- Update dashboard feature spec to validate it works as expected.