Solution Patterns
Let end users manage metrics
Let customers hide or show metrics on an embedded dashboard for their whole company.
Manage metrics lets end users choose which metrics show on the dashboard. The choice applies to everyone with the same clientId.
Before you start
- The dashboard is in a data app as a dashboard embed.
Steps
- Go to Data Studio > Data Apps and open the data app.
- Open Embed info and select the dashboard embed in Embeds.
- On Access control, turn on Manage metrics and select Save.
- In the embedded dashboard, the end user opens the layout menu and selects Manage metrics.
- In the Manage Metrics dialog, they turn metrics on or off, or select Show all or Hide all.
- They select Save.
The hidden metrics stay hidden on future visits, for every person at that customer.
Manage and delete are different
- Manage metrics hides or shows a metric. The metric still exists.
- Delete metrics (
isEnableArchiveMetrics) removes it from the dashboard for that client. With it off, a person can still delete metrics they created themselves.
To set these per token, send "permissions": { "isEnableManageMetrics": true } or "isEnableArchiveMetrics": true. The token wins over Access control.
If something goes wrong
- “Access denied: isEnableManageMetrics.” Manage metrics is off for this embed or token.
- “Access denied: isEnableArchiveMetrics.” The user tried to delete a metric they did not create, and Delete metrics is off.
See Token body.