Skip to Content

End-User Features

Let end users create metrics

Turn on metric creation in an embedded dashboard and tie each new metric to the person who made it.

Before you start

  • The dashboard is in a data app as a dashboard embed.
  • The datasource has a datamart. Its tenancy type must match the datasource’s.
  • Your backend creates guest tokens. See Guest token API.

Steps

  1. Go to Data Studio > Data Apps and open the data app.
  2. Open Embed info and select the dashboard embed in Embeds. The Access control page opens.
  3. Turn on Create metrics.
  4. In Datamart, select the datamart end users build from.
  5. Choose the creator mode: Power Mode (drag and drop or write a query) or Bryn (natural language questions).
  6. Choose the join mode: Multiple Sheets or Single Sheet.
  7. Select Save.
  8. In your backend, send params.userIdentifier in every guest token:
{
  "clientId": "acme-corp",
  "dataAppName": "Customer Analytics",
  "params": {
    "userIdentifier": "jane@acme.example"
  }
}

End users now see the create metric control in the dashboard. New metrics are saved for future visits.

What userIdentifier does

clientId is the tenant. userIdentifier is the person. Each new metric stores the userIdentifier of its creator.

  • Only the creator can make the metric private or public.
  • A private metric is hidden from other people of the same client.
  • The creator can delete their own metric, even when Delete metrics is off.

Without userIdentifier, a metric has no owner. Nobody can then change whether it is private.

Turn creation off for one token

Send "permissions": { "isDisableMetricCreation": true } to hide creation for that token. A token cannot turn creation on. Use Create metrics for that.

Related settings on the same page: Edit metrics (isEnableMetricUpdation) and Delete metrics (isEnableArchiveMetrics). See Token body.

If something goes wrong

  • Save is greyed out. Select a datamart. If the alert says “Datasource and datamart tenancy types must match to allow metric creation”, fix the tenancy on the datamarts page.
  • “Custom SQL metrics cannot be edited by end users.” (HTTP 403). End users can use Custom SQL metrics but cannot edit them. Edit them in the workspace.

Next, let end users save boards and dashboards.