Embed usage analytics: per-viewer chart engagement and filter interactions

Open
#32,562 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript

Research direction

Start by reading issues #28367 and #29696, then inspect the planned embed view-events model referenced in this issue. Trace how embedded query events carry the external user id and tenant identifier, and identify the event paths for chart engagement and filter changes. Done means those events can be joined to dashboard loads by the same viewer and tenant, with the chart actions and filter field and value available in analytics.

Written by the indexing model from the issue text.

Description

✨ Feature Request 💜 Customer Support Advisory Call Request
Description

Lightdash analytics now reports embedded dashboard loads per external viewer (the built-in Embed usage dashboard and the embed_reach explore). Extend it so an embedding customer can see what each external viewer did inside the embed, not only that they opened it:

  • which charts on the dashboard the viewer engaged with (viewed in the viewport, expanded, exported)
  • which dashboard filters they applied, with the filter field and the value chosen
  • all of it keyed by the same external user id (and tenant identifier) the dashboard load is attributed to, so load, chart and filter activity join on one viewer
What problem does this solve?

The general rule: a dashboard load tells the embedding customer that a user arrived, not what they looked for. Everything that happens inside the iframe (tile interactions, filter changes) is invisible to the host application's own product analytics, which only sees the page URL, and invisible in Lightdash analytics, which stops at the load.

The concrete case: a customer embeds one dashboard per tenant inside their product. Their product analytics tool tells them a given user opened the page that holds the dashboard. They want to know, per user, which dashboards and charts that user looked at and which filters they applied, so they can see which views their customers use and where to invest next. Today neither side of the iframe can answer that.

Related
  • #28367 attributes embedded query events to the external user and tenant (the identity contract this would reuse)
  • #15957 usage analytics for embedded dashboards (the umbrella ask)
  • #29696 view events vs query events, group and user attribute filters, for internal users

The embed view-events model being planned separates views from filter changes and reloads on purpose. This issue is the layer on top of it: filter changes and per-tile engagement, attributed to the external viewer.

Dominant language
TypeScript
Stars
6.2k
Forks
809
Avg merge
12h 13m
Merged PRs (30d)
854

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lightdash/lightdash

All issues in lightdash/lightdash

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.