Creating a Google Developers application
This guide will run you through the process of configuring a project for analytix to use.
By the end of this guide, you will know:
- how to set up an application on the Google Developers Console
- how to enable the YouTube Analytics API in your application
- how to make analytix aware of your application
Creating a project
To create a project:
- sign into your Google account. This does not need to be the same account as the one you are retrieving data from.
- on the navbar, click on the dropdown that says "Select a project".
- click "NEW PROJECT".
- enter your project name, then click "CREATE". You do not need to set an organisation.
After this, you'll be redirected back to the dashboard. It may take some time to create the project.
Setting up the YouTube Analytics API
Enabling the YouTube Analytics API
- Click on "ENABLE APIS AND SERVICES".
- Search for "youtube", then click "YouTube Analytics API".
- Click "ENABLE".
Configuring the consent screen
Click "CREATE CREDENTIALS" in the top-right corner, then proceed with the following steps.
- Credential type
- Under "What data will you be accessing?", select "User data"
- Click "NEXT".
- OAuth consent screen
- Enter the following information:
- App name: the name of your application; this does not need to be the same as your project's name
- User support email: this is required even though your project will remain private to you
- App logo: an optional logo for your application
- Developer contact information: same as User support email
- Click "SAVE AND CONTINUE".
- Enter the following information:
- Scopes
- Click "ADD OR REMOVE SCOPES".
- Select the
.../auth/yt-analytics.readonly
and.../auth/yt-analytics-monetary.readonly
scopes; these should be the last two in the list. - Click "UPDATE".
- Click "SAVE AND CONTINUE".
- OAuth Client ID
- Select your application type. If you're not sure which option to select, choose "Desktop app".
- Enter a name for your OAuth 2 client. This does not need to be the same as your project name.
- Your credentials
- Click "DOWNLOAD".
- Save your secrets file in the root directory (or subdirectory thereof) of your project. It is recommended you give it an easy name to remember, such as "secrets.json".
- Click "DONE".
Warning
You should never share your secrets file with anyone.
Setting yourself as a test user
In order to use your application, you need to add yourself as a test user. To do so:
- click "OAuth consent screen"
- under the "Test users" heading, click "+ ADD USERS"
- type your email address into the box
- click "SAVE"
Success
You're all done! You can now start working with analytix.