[Yandex Cloud documentation](../../index.md) > [Yandex DataLens](../index.md) > [Tutorials](index.md) > Service analytics > AppMetrica: direct connection

# AppMetrica: Direct connection


You can visualize and explore AppMetrica data in Yandex DataLens using the following methods:

* Direct access.
   DataLens connects directly to AppMetrica. This method is the easiest and fastest but supports a [limited](../function-ref/availability.md) set of functions.
* Real-time export of data from AppMetrica to Managed Service for ClickHouse®.
   Raw data is available and you can use pre-aggregation and post-processing at the database level. To implement this option, [set up data export](https://appmetrica.yandex.ru/docs/common/cloud/about.html?lang=en) and [create a connection](../operations/connection/create-clickhouse.md) from DataLens to the ClickHouse® database.

In this tutorial, we use direct access. An application added to [AppMetrica](https://appmetrica.yandex.com) will be used as the data source. You can view a list of applications available to you under [Applications](https://appmetrica.yandex.com/application/list).

If you do not have any apps available, then before implementing this tutorial, [add an app](https://appmetrica.yandex.ru/docs/quick-start/concepts/quick-start.html) or use the standard **AppMetrica Dashboard**.

To visualize and explore data, [set up DataLens](#before-you-begin) and follow the steps below:

1. [Create a connection and a standard dashboard](#create-dashboard).
1. [Edit the standard dashboard](#edit-dashboard).


## Getting started {#before-you-begin}

To get started with DataLens:


{% list tabs group=datalens_user %}

- New user {#new}

  1. [Log in](https://passport.yandex.com/auth) to your Yandex account. If you do not have an account, [create](https://yandex.ru/support/passport/authorization/registration.html) one.
  1. Open the DataLens [home page](https://datalens.ru/promo).
  1. Click **Start in cloud**.
  1. Confirm that you have read the [Terms of use](https://yandex.com/legal/cloud_termsofuse/?lang=en) and click **Log in**.

- I am already using Yandex Cloud {#already}

  1. [Log in](https://passport.yandex.com/auth) to your Yandex account.
  1. Open the DataLens [home page](https://datalens.ru/promo).
  1. Click **Start in cloud**.
  1. Select one of these options:

     * If you already have an organization, select it from the drop-down menu in the **Organizations** tab and click **DataLens**.

       {% note info %}

       To activate a DataLens instance, the user must have the `admin` or `owner` role. For more information about roles, see [Access management in Yandex Identity Hub](../../organization/security/index.md).

       {% endnote %}

     * If you have a cloud but no organization, click **Add new DataLens**. In the window that opens, enter a name and description for your organization and click **Create organization and DataLens**. For more information about working with organizations, see [Getting started with organizations](../../organization/quickstart.md).

{% endlist %}

If you encounter a technical issue with the service, contact Yandex Cloud [support](https://center.yandex.cloud/support). To ask for advice, discuss a solution to your issue, or explore current best practices, join the [DataLens](https://t.me/YandexDataLens) chat in Telegram.


## Create a connection and a standard dashboard {#create-dashboard}

{% note warning %}

This step is available to users who have an app in AppMetrica. If you do not have any apps, open the standard **AppMetrica dashboard** and go to the [next step](#edit-dashboard).

{% endnote %}

1. Go to [DataLens](https://datalens.ru/?skipPromo=true).
1. In the left-hand panel, select ![image](../../_assets/console-icons/thunderbolt.svg) **Connections** and click **Create connection**.
1. Select **AppMetrica** as the connection type.

   ![image](../../_assets/datalens/solution-06/03-choose-appmetrica.png)

1. Enter `My AppMetrica` for the connection name and click **Get token**.

   ![image](../../_assets/datalens/solution-06/get-token.png)

   If this is your first connection to an AppMetrica app, grant the required permissions to the service.

1. Select the app from the drop-down list.

   ![image](../../_assets/datalens/solution-06/select-an-app.png)

1. Set up your connection:

   ![image](../../_assets/datalens/solution-06/specify-fields.png)

   1. Set the data accuracy (sampling rate). You can change the accuracy after you create the connection.
   1. Select the **Direct access** connection type.
   1. Enable **Automatically create a dashboard on this connection**.

1. In the top-right corner, click **Create**.

   Once the connection is created, a folder containing a dashboard and a set of datasets and charts will open.

   {% note info %}
   
   * By default, AppMetrica data is exported for the last 60 days. If you add a filter by date to the chart, the AppMetrica filter will be reset. We recommend adding a filter by date as an offset relative to the current date.
   * On the AppMetrica side, there is a quota of three concurrent requests per API key.
   
   {% endnote %}

## Edit the standard dashboard {#edit-dashboard}

{% note warning %}

If you do not have an app in AppMetrica and you skipped the previous step, use the **AppMetrica dashboard**.

{% endnote %}

You can edit the standard [dashboard](../concepts/dashboard.md) however you want. For example, you can delete a chart, resize it, or change the visualization type.

1. Open the dashboard.

1. Click **Edit** in the top-right corner.

   ![image](../../_assets/datalens/solution-06/05-edit-dashboard.png)

1. To delete the **Click dynamics** widget, click ![image](../../_assets/console-icons/xmark.svg) in the top-right corner.

   ![image](../../_assets/datalens/solution-06/06-specify-widgets.png)

1. To resize the **Installation dynamics** widget, drag it by the bottom-right corner.

1. Click **Save** in the top-right corner to save the dashboard.

   ![image](../../_assets/datalens/solution-06/07-save-dashboard.png)

You can edit any chart on the dashboard. For example, change the visualization type for the **Ad networks** chart from **Attracting users**.

To share a dashboard or chart, use one of the following methods:

* [Add](../security/add-new-user.md) a user to your organization or cloud and grant them access to a dashboard or chart.
* [Export](../qa/connections.md#uploading-data-logs-api) data to a [Managed Service for ClickHouse®](../../managed-clickhouse/index.md) cluster and use a connection to the ClickHouse® database as a source. To learn more about the Managed Service for ClickHouse® pricing plans, see [Pricing](../../managed-clickhouse/pricing.md).

_ClickHouse® is a registered trademark of [ClickHouse, Inc](https://clickhouse.com)._