LinkedIn Pages: Retrieving data for custom metrics and data sources (video)

Need some help building custom metrics and modelled data sources for LinkedIn Pages? Watch the video at the end of this article and follow along with our co-founder Allan Wille as he walks through a few examples of how to navigate the query builder and retrieve LinkedIn Pages data.

This article describes the video content in detail so you can watch the video and then refer to the procedures here to learn at your own pace.

This article includes:

Connecting to your LinkedIn Pages account

The first thing you need to do is connect to your LinkedIn Pages account. The following steps describe how to connect when creating a custom metric and a modelled data source and when creating a modelled data source only.

To connect to your LinkedIn Pages account:

  1. If you want to create a custom metric and a modelled data source at the same time:
  • In the left navigation sidebar click the + button beside Metrics.
  • On the Where is your data? page, select LinkedIn Pages.
  • Click Create a custom metric.
  • Select the LinkedIn Pages account and account settings you want to access. If you need help, go here.
  • Go to step 3.
  1. If you want to create a modelled data source only:
  • In the left navigation sidebar, click your Account Name > Data Sources.
  • Click the Create a New Data Source button.
  • On the Where is your data? page, select LinkedIn Pages.
  • Select the LinkedIn Pages account and account settings you want to access. If you need help, go here.
  • Go to step 3.
  1. You’re now on the Choose data for your metric page of the query builder and ready to run through the examples described below.

Retrieving your LinkedIn Pages data

In the query builder we use the data view you select and run a query to get a list of available columns from within that data view. You then choose from the columns to specify the data to include in your modelled data source. Note that your choices will determine the values and dimensions for the custom metrics you’ll later create based on the modelled data source.

Example 1: Daily activity, no segmentation

In this example, we retrieve data that includes daily values for each measure, incrementing over a 7-day period.

  1. In the Choose data for your metric page, under Data view, click the drop-down and select CompanyPageStatistics.

  1. To specify the measures to report on, under Columns, select AboutPageViews and AllPageViews.
  2. To specify the start date for the date range, under Columns, select ReportTimeRangeStart and apply a filter using “Is” as the operator and “7 days ago” as the date.
  3. To specify the end date for the date range, under Columns, select ReportTimeRangeEnd and apply a filter using “Is” as the operator and “Today” as the date.

The start and end date range settings you chose above will retrieve data for the last 7 days. Note that the LinkedIn API requires you to select “Is”, not "After", when filtering on dates.

  1. To retrieve data by day, under Columns, select TimeGranularity. Apply a filter using “Equals” as the operator and enter “DAY” (in ALL CAPS) as the value.
  2. To specify which day is being reported on, under Columns, select UsageStartTime.
  3. Click Preview data.

In the UsageStartTime column, you’ll see time incrementing up, over a 7 day period. This is the column you’d select as the date/time dimension when building your metric.

Example 2: Snapshot of data, for a specific dimension

In this example, we retrieve snapshot data that includes the total value for each measure, for a specific dimension.

  1. In the Choose data for your metric page, under Data view, click the drop-down and select CompanyPageStatistics.

  1. To specify the measures to report on, under Columns, select AboutPageViews and AllPageViews.
  2. Under Columns, select Category. Apply a filter using “Contains” as the operator and “Seniority” (or any other category you want to report on, for example, by “Country” or by “Industry”) as the value.

By zeroing in on a specific category, you can create more effective, focused metrics.

  1. Under Columns, select Type.
  2. Click Preview data.

Example 3: Daily increment, for a specific dimension

In this example, we retrieve data that includes the net value for each measure for a single day, for a specific dimension. When you build a metric using this query, you’ll see your measures grow over time.

  1. Follow steps 1 - 4, as described above in example 2.
  2. To specify the start date for the date range, under Columns, select ReportTimeRangeStart and apply a filter using “Is” as the operator and “Yesterday” as the date.
  3. To specify the end date for the date range, under Columns, select ReportTimeRangeEnd and apply a filter using “Is” as the operator and “Today” as the date.

The start and end date range settings you chose above will retrieve data for a single day. Note that the LinkedIn API requires you to select “Is”, not "After", when filtering on dates.

  1. To specify which day is being reported on, under Columns, select UsageStartTime.
  2. Click Preview data.

Using LinkedIn Pages API | PowerMetrics Query Builder Tutorial

Watch the video demo:

Learn more

Have more questions? Submit a request