Public access
You can make the charts and dashboards you create public, so any user can follow a link and view the object you published without logging in. However, the user will not be able to view chart settings, connections, or the dataset, or run an SQL query.
Warning
Before publishing any data, make sure your charts and dashboards do not contain any personal data or trade secrets. Access to published data is not restricted.
Publishing rules
Before publishing data, make sure that:
-
You have the
Admin
permission to published charts, dashboards, and related objects. -
Your charts and dashboards do not contain any personal data or trade secrets. Access to published data is not restricted.
-
The connection your objects run on top of supports data publication. You cannot publish data from the following connections:
-
Note
You can share a dashboard or chart based on Yandex Metrica or AppMetrica data.
To secure your published data:
- Grant the user permission to view only the tables that are used to build a dataset when connecting to a database.
- Minimize the data in a dataset and only add the required filters to your dashboard. You can download data on a public dashboard in a machine-readable format.
Publishing an object
Warning
If you use a new DataLens object model with workbooks and collections:
- In the left-hand panel, select
Collections and workbooks. - Open the appropriate workbook and select an object.
Follow the guide from step 2.
-
On the navigation page
, find the dashboard you need and open it. -
At the top of the dashboard interface, click
and select Public access. -
In the window that opens, set up public access as follows:
- Under Current object, enable publishing. You will see a link for public access to the dashboard below.
- (Optional) Under Author or link to source, specify the link to the dashboard source or author and its text. The link will be displayed at the bottom of the dashboard.
- (Optional) Under Linked objects, select the objects to be public. By default, DataLens will automatically grant access to all linked objects.
- Click Apply.
Warning
If you use a new DataLens object model with workbooks and collections:
- In the left-hand panel, select
Collections and workbooks. - Open the appropriate workbook and select an object.
Follow the guide from step 2.
-
On the navigation page
, find the chart you need and open it. -
At the top of the wizard interface, click
and select Public access. -
In the window that opens, set up public access as follows:
- Under Current object, enable publishing. You will see a link for public access to the chart below.
- (Optional) Under Author or link to source, specify the link to the chart source or author and its text. The link will be displayed at the bottom of the chart.
- (Optional) Under Linked objects, select the objects to be public. By default, DataLens will automatically grant access to all linked objects.
- Click Apply.
Sharing a chart based on Yandex Metrica or AppMetrica data
To share a chart or dashboard containing Yandex Metrica or AppMetrica data, use one of the following methods:
- Add a user to an organization or cloud and grant them access to a dashboard or chart.
- Export data to a Managed Service for ClickHouse® cluster and use a connection to the ClickHouse® database as a source. To learn more about Managed Service for ClickHouse® pricing, see Pricing.
Embedding public objects
You can embed published dashboards and charts into a website or app using an iframe
.
Getting the embed code
To get the embed code with a preset dashboard or chart design:
- Publish your dashboard or chart.
- Open the dashboard or chart using the public link provided to you.
- Click
in the top-right corner and select Embed code. - In the window that opens, set up the menu language, theme, and appearance. On the right of the window, copy the link or embed code with the preset design parameters.
Filtering embedded charts
You can apply filtering to embedded charts. To do this, provide the filtering parameters in the chart link.
To set up filtering:
- Add a chart and selector to the dashboard.
- Publish the dashboard.
- Set the required selector values.
- Click
next to the chart on the dashboard and select Embed code. - In the window that opens, set up the menu language, theme, and appearance. On the right of the window, copy the link or embed code with the preset design and filter parameters.
The filter parameters will be added to the chart URL after ?
. When providing multiple parameters, they will be separated by &
(ampersand).
<iframe frameborder="0" src="https://datalens.yandex/z2uxl5pbztkep?shopid_vj2j=sp-15&shopid_vj2j=sp-18&shopid_vj2j=sp-20&_embedded=1&_no_controls=1&_theme=light&_lang=ru" width="100%" height="400px"></iframe>
ClickHouse® is a registered trademark of ClickHouse, Inc