Creating an AppMetrica Logs API connection
Before creating a connection to the AppMetrica Logs API, you need to create a ClickHouse cluster in Yandex.Cloud. DataLens will automatically upload AppMetrica data via the Logs API to the specified cluster.
Connecting to the AppMetrica Logs API
To create an AppMetrica Logs API connection:
Go to the connections page.
Click Create connection.
Select AppMetrica as the connection type.
Specify the connection parameters:
In the field next to the folder name, enter the connection name. You can set any name.
OAuth token. Click Get token or enter the OAuth token manually to access the AppMetrica data.
App. Specify one or more applications to connect to. You can select them from the list or enter them manually separated by commas.
Connection. Select Logs API as the connection type.
If you want to get access for a username other than your current Yandex account or the required application isn't on the list, see Getting an OAuth token.
Specify the parameters for exporting data from source applications:
- Tag source. Select the type of data to upload from the list.
- Upload from. Specify the start date for exporting data.
- Frequency. Specify how often data is updated in the connection.
Specify information about the target database:
- Hostname. Specify the path to the ClickHouse cluster host in Yandex.Cloud.
- Port. Specify the DB connection port.
- Database name. Specify the name of the DB to connect to.
- Username. Specify the username for the DB connection.
- Password. Enter the password for the specified user.
- Uploading data to the connection may take anywhere from a few minutes to a few hours depending on the amount of data in the tag and the specified start date.
- Changing the Upload from parameter fully resets the connection data.
- Changing the Frequency value from
Regularfully resets the connection data.
Getting an OAuth token
To get access to an AppMetrica app for a username other than your current Yandex account, follow these steps:
- Switch to an account that has access to AppMetrica.
- Use the link to get a token. If necessary, allow access to the application, then copy the token.
- Switch to an account that has access to Yandex DataLens.
- Create a new connection to Yandex.Metrica and paste the obtained token from the clipboard to the OAuth token field.