PowerMetrics: Connecting to YouTube (with data feeds)

 

Our recent redesign simplifies the data transfer experience by combining raw and modelled data sources into a single object - data feeds. We’re gradually releasing this new feature to our customers.
If you see Data Feeds in the left navigation sidebar, you’ll learn how to connect to your data and create data feeds in this article. If not, go here.

 

If you want to add YouTube instant metrics, go here.

 

Ready to get the most from your YouTube video data? Get started by setting up a connection between PowerMetrics and your YouTube data and adding one (or more) data feeds.

When you're finished adding YouTube data feeds, you'll use them to power your custom metrics.

This article includes:

Creating a YouTube data feed

When you create a data feed, you:

Connecting PowerMetrics to your YouTube data

The first step in creating a YouTube data feed is to connect PowerMetrics to your data.

Here are a few things to note:

Your data is safe with us. The first time you connect your YouTube data to PowerMetrics, you'll be prompted to enter your Google login credentials and give permission to allow access to the data within your YouTube account. We are serious about protecting your data privacy.

Managing your connections. By default, your connection name looks like this: yourname<date and time created>. You can rename connections from your list of connections (accessed by clicking the in the left navigation sidebar and selecting Connections) or within the application as you create metrics. Go here for more information on managing your account connections. You can use the same account connection every time you connect to YouTube. If you have trouble accessing an existing connection, your OAuth token may have expired. If that happens to you, go here for help.

Google account credentials. When connecting your YouTube data to PowerMetrics, you'll be prompted to connect your YouTube account by entering your username and password. Make sure you enter the username and password for the Google account that's connected to your YouTube channel.

To connect PowerMetrics to your YouTube data:

  1. In the left navigation sidebar, click the + button beside Data Feeds.
  2. Click Select data.
  3. On the Where is your data? page, select YouTube.
  4. If this is your first time connecting to YouTube:
    • Click Add new account.
    • Enter your Google login credentials and click Allow to enable Klipfolio PowerMetrics to securely access your YouTube data.
    • Next, to further define the data you're looking for, under Choose account settings, select your Channel from the drop-down list. Click Use account.
  5. If you’ve connected to YouTube before, we assume you want to use the same account and take you directly to the next step - Choosing the data you want to retrieve in the query builder. If you want to connect to a different account, you can do so there by clicking the account connection at the top of the data preview window (see below). You can either select an alternate, existing account or click “Add new account”.

    You're connected! Next step – choose the data you want to retrieve using the query builder.

Choosing the data you want to retrieve in the query builder

In the query builder, you tell us what data you want to retrieve for your data feed. Later, when you create custom metrics, you’ll choose which pieces of data from the data feed you want to display for each metric.

Using the data view you select, we’ll run a query to get a list of available columns (fields) from within the data view. You’ll then choose from those columns to specify what data to include in your data feed.

Tip: Use filtering to pinpoint the data you want to retrieve and include in your data feed. This reduces the size of the query, improving performance and ensuring you only get the data you actually need. You can apply filters to the data view and to columns in the left sidebar and in the data preview. Learn more about filtering.

Note: If you want to retrieve data using either of these data views: TimeBasedReports or TopVideos, for a specific playlist, you'll find some helpful tips for retrieving playlist data in this section.

To choose the data you want to retrieve:

  1. In the Choose data for your data feed page, under Data view, click the drop-down and choose the subset of data you want to query.

    Tip: Find the data view you’re looking for by entering its name in the search box or by entering the name of a column/field to find the data view that includes it.
  2. Under Data view filters, add required filters (if needed) and optional filters (if desired).
    Tip: APIs for some services include "StartDate" and "EndDate" as optional data view filters. Applying filters here, at the query (source) level, rather than later at the query results level can improve efficiency and simplify data handling.
  3. Under Columns, select the checkboxes beside the columns you want to include in your data feed.
    Tip: Columns represent the fields that are available for the data view you selected above. Each item you choose will display as a column in the data preview table. If there are a lot of columns to choose from and you know what you’re looking for, start typing the column name into the search box. You can add up to 30 columns for each data view.
  4. Optionally, apply filters to applicable columns to narrow down your data before previewing.
    Tip: You may find it easier to apply filters to columns in the next step (in the data preview table) as you can see your data more clearly there. However, if you know your data set well, applying filters in the sidebar can be beneficial because it removes excess data before previewing. It may also be necessary when your data is too large to query all at once.
  5. When you’re done selecting (and filtering) columns, click Preview data. The data preview window is populated with the results of the query for the columns you chose.
    Note: The data preview table can show up to the first 1000 rows of your data. As a result, if you have a large data set, some rows may not display. Using the drop-down, you can select the number of rows to display (50, 100, 500, or 1000). You can also see how long it took for your query to complete. (See below.)
  6. If this isn’t the data you want for your data feed, choose a different data view and/or columns. To preview your most recent choices, either click Preview data again or click reload data Reload data (located above the data preview table).
    Note: At the top of the data preview window, you can see the YouTube account you’re currently connected to (see below). By clicking it, you can change to a different account. If you change accounts, your recent choices are removed and you start over by choosing a data view and columns.
  7. In the data preview window, you can narrow down the data you want to include in your data feed by applying filters to applicable columns.
  8. When you’re satisfied with your choices, click Use this data.
    You've chosen your data. Next step - refine the data in the data feed editor.

Tips for retrieving playlist data

If you want to retrieve data using either of these data views: TimeBasedReports or TopVideos, for a specific playlist, you’ll need to:

  • Filter the data view by “IsCurated” and “Playlist”
  • Select one or more of the following columns: “AverageTimeInPlaylist”, “AverageViewDuration”, “EstimatedMinutesWatched”, “PlaylistStarts”, “Views”, and “ViewsPerPlaylistStart”.
    Note: You must also select "Day" for TimeBasedReports.

To retrieve data for TimeBasedReport or TopVideos, for a specific playlist:

  1. Under Data view, click the drop-down and select either TimeBasedReports or TopVideos.
  2. Under Data view filters, click + Add filters (optional) and select the checkbox beside IsCurated and beside Playlist. Click Apply.
  3. Click the Click to add filter box for IsCurated. Select Equals as the operator and select true. Click Apply.
  4. Click the Click to add filter box for Playlist. Select Match All and Equals as the operators and enter your playlist Id as the value. Click Apply.
  5. Under Columns, select one or more of “AverageTimeInPlaylist”, “AverageViewDuration”, “EstimatedMinutesWatched”, “PlaylistStarts”, “Views”, and “ViewsPerPlaylistStart”.
    Note: You must also select “Day” as a column for TimeBased Reports.
  6. Click Preview data.
  7. Click Save query.

Refining data in the data feed editor (optional)

You’ve arrived in the data feed editor where you can choose to either accept the automatic settings or make changes. Learn more about editing data feeds.

If you’re happy with the automatic settings:

  • Click Save data feed.
    Note: If you chose Videos as the data view and Duration as one of the columns in the previous step, see the Tips for refining your data section below first.

If you want to make changes:

  • Some common adjustments include changing the data format or names for columns, updating the data feed name, and combining columns using formulas - there are many customization options available.
  • If you chose Videos as the data view and Duration as one of the columns in the previous step, see the Tips for refining your data section below.
  • If you want to adjust your query choices (for example, add or remove columns or filters) click the tile under Data service to return to the query builder. (See below.)
  • When you’re finished editing the data feed, click Save data feed.

Tips for refining your data

Did you choose Videos as the data view and Duration as one of the columns in the previous step (choosing data to include in your data feed)?

If the answer is yes, then you’ll need to edit the data format for the duration column to use ISO-8601 format.

To set the duration column to use ISO-8601 format:

  1. Select the Duration column.
  2. Under Data Format, click the drop-down and select Duration.
  3. Under Input Format, click the drop-down and select ISO-8601.

Next steps - Creating YouTube custom metrics

Now that you've created one or more YouTube data feeds, you can return to them and use them to make custom metrics. A single data feed can be used to create a single or multiple custom metrics.

To create custom metrics using a data feed:

  1. In the left navigation sidebar, click Data Feeds to open your list of data feeds.
  2. Select the data feed you want to use for your custom metric.
  3. Click either the +Add metric button in the top right corner of the window or open the Metrics tab and click +Add metric. (See below.)
  4. Choose the settings for your custom metric and click Save metric. If you need help, go here to learn more.
    The metric opens in its homepage and is added to your list of metrics (accessed by clicking Metrics in the left navigation sidebar).

Learn more

Have more questions? Submit a request