Developer Guide: Specifying Audiences for Analysis

In this guide you will learn how to specify an audience for your Media Strategies API analysis tasks, based on a number of demographic dimensions.

Defining an audience

When using the Media Strategies API you specify an audience using demographic segments.

For example if you are looking to analyze engagement from members in the US and UK in the high-tech sector your definition would be:

  • Countries - United States or United Kingdom
  • Sectors - high-tech

When you run your strategy specifying this audience only activity from members in these countries and in the high-tech sector will be analyzed.

Specifying audiences for analysis

The audience parameter type allows you to specify audiences and you'll see it frequently used by strategies.

An audience parameter that reflects the example audience above would be:

{
  "audience": {
    "countries": ["united states", "united kingdom"],
    "sectors": ["high-tech"]
  }
}

Using this audience for the top_urls strategy gives us these parameters:

# POST /pylon/linkedin/task
{
  "type": "strategy",
  "subscription_id": "cd99abbc812f646c77bfd8ddf767a134f0b91e84",
  "name": "Top urls for high-tech sector",
  "parameters": {
    "strategy": "top_urls",
    "version": 1,
    "parameters": {
      "audience": {
        "countries": ["united states", "united kingdom"],
        "sectors": ["high-tech"]
      },
      "comparison_audience": "global"
    }
  }
}

Selecting audience segments

The values you provide must be valid for the relevant demographic dimension. The valid values for each dimension are listed on the valid demographic segments page.

When you specify multiple values for a dimension the audience analyzed must belong to one of the segments you list. In the example above we are saying that audience members must be in the US OR in the UK.

When you specify values for multiple dimensions the analyzed audience must fit each of the criteria. In the example above we are saying that audience members must be in the listed countries AND must be in the high-tech sector.

Note that when you specify an audience, if you provide no values for a particular demographic dimension then all segments of the dimension are included in the analysis. For example if you do not specify any countries, then activity from all countries is included in the analysis.

Example audiences

The following examples show you how you can specify a range of audiences.

1) Decision makers in a specific country

The following audience parameter specifies seniorities commonly known as 'decision makers' in Germany only:

{
  "audience": {
    "seniorities": ["director", "vp", "cxo", "partner", "owner"],
    "countries": ["germany"]
  }
}

2) Functions in large companies

The following audience parameter specifies members who work in large companies, who belong to the finance or accounting function:

{
  "audience": {
    "functions": ["finance", "accounting"],
    "company_sizes": ["1001-5000", "5001-10000", "10001+"]
  }
}

3) Custom segments in selected industries

The following audience parameter specifies members classified into LinkedIn's customer segment definitions working in medical industries:

{
  "audience": {
    "custom_segments": ["ceo network", "cfo network"],
    "industries": ["hospital & health care", "medical practice", "mental health care"]
  }
}