Lightdash allows you to embed your dashboards using expirable URLs and tokens (embed URLs from now on). This is a great way to enable self-serve analytics in your own application and platform by leveraging the insights you’ve got in Lightdash and making them available to your own users.
Generate new secret
button. If you do this, people with an old URL will automatically lose access to any previously shared embed URL.
preview
to see the embed content and click on Generate & copy URL
to generate an embed URL for this dashboard
secret
to make sure people can’t be using embed URLs outside your app.
To make this easier to integrate, we included some code snippets you can copy and use in your app to generate a valid embed URL
shop_id
and I set the default value to all
.
sql_filter
Order Summary
dashboard, I use the orders
and the shops
tables to build all of the charts. So, in these two tables, I’m going to add a row-level filter using my shop_id
attribute, like:
user attributes
section of your embedded dashboard setup.
For example, if I wanted the embed link to only show data for shop_id = Thyme to Shine
, then I would add a user attribute shop_id
with the value Thyme to Shine
.
shop_id
in the Lightdash embedded dashboard would change depending on which shop_id
the user belonged to in my app.
To do this, I would pass Lightdash an external value for shop_id
in the embed code snippet. This could look something like: