Learn SharePoint Series - Part Nine - Audience Targeting

Introduction

This article is the 9th part of my SharePoint series. Here are my previous articles,

  1. Learn SharePoint In Series - Part One - Introduction
  2. Learn SharePoint In Series - Part Two - Web Application
  3. Learn SharePoint Series - Part Three - Site Collections
  4. Learn SharePoint Series - Part Four - Subsites
  5. Learn SharePoint Series – Part Five – SharePoint Lists
  6. Learn SharePoint In Series - Part Six - Power Of Versioning
  7. Learn SharePoint In Series - Part Seven - Lists Advanced Settings
  8. Learn SharePoint In Series - Part Eight - Validation Settings in List Settings

In the previous article, I have explained about various list level settings available in SharePoint and explained Validation Settings in detail. Now, in this article, I am going to cover what audience targeting is and how to configure the audience targeting for lists and libraries.

In this article, I am going to cover the following topics.

  • Introduction to Audience targeting in List and Library Setting.
  • Why is audience targeting needed?
  • How to configure audience targeting with an example?
  • Summary.

Introduction to Audience Targeting in List and Library Settings

As the name suggests, audience targeting means targeting your audience. As we are in SharePoint and SharePoint is mainly used to manage your data and contents, we can redefine the meaning of target audience in SharePoint as "The configurable feature of SharePoint that allows its user to target the contents to its particular people is called as Target Audience or Audience Target”. In other words, the mechanism of identifying the contents and displaying to the appropriate groups of users in SharePoint is called as Audience targeting.

For example, there is a shopping portal in which the items are classified by region. So contents relevant to one region should not be visible to other regions and vice versa. So this can be avoided using targeting audience. Let’s understand this concept in details using the real-world example.

Why is audience targeting needed?

Let’s create a situation, there is an organization with name Contoso. Contoso has a custom list. In the list, they are creating sensitive and non-sensitive information and they are setting up the permission to the custom lists because SharePoint has powerful permission management. Now they have 2 user groups (What are groups in SharePoint that I am going to explain later in this series) Managers and Normal Users. The requirement is that the items which are sensitives must be visible to only users in Manager Groups, and other items should be visible to other users.

Now, what are the options to achieve this?

  1. Enter the item and assign the item level permission to the list. But configuring the item level permission is two steps process. Because first, we have to create the item in the list and then share the item with the required groups of users.

  2. Using audience targeting mechanism.

Audience Targeting is available with every list and library in SharePoint but it is by default disabled. We have to enable the audience targeting setting from lists and libraries setting manually.

How to enable/disable audience targeting?

Step 1

Open the list on which you want to enable the audience targeting. Click on setting icons and then click on List Settings.

SharePoint

Step 2

 

Check the list of columns in the list. Here, we do not have the column for Audience Targeting.

SharePoint

 

Step 3

Now, click on Audience targeting settings option from list settings.

SharePoint

 

Step 4

Check on the “Enable Audience targeting” and click OK. By default it is unchecked.

SharePoint

 

Step 5

Now, check the columns in list setting again and now you will find an additional column for Audience targeting in the list.

SharePoint

 

So we have successfully enabled the audience targeting for the list Employee Directory.

Configuring audience targeting with an example

Now we have 2 groups in the SharePoint Site. Both the groups have different users as shown in the below images.

Managers groups have “Aakash Maurya” as its user.

SharePoint

 

The normal user's group have Contoso user in it.

SharePoint

 

Now, just let’s add the item. Now, you will observe that while adding items to the list we have an additional column as Audience Targeting.

SharePoint

 

Note that here we can only insert the SharePoint Groups and Distribution groups. Here we cannot use Users directly. Similarly, add another item with title “Normal user” and assign Normal Users in the target audiences columns.

So, for now, we have 2 records in the list. One is for managers and other is for normal users. If you look at the lists then you will be able to see both the items. So now what to do to use the target audience feature? Target audience works with WebParts such as Content Query Web Part.

So now let's create a page and keep the Content Query WebPart there. And configure the web part to get the items from Employee Directory list(How Content Query WebParts works that I will explain later in this series).

Keeping and Configuring Content Query WebPart

Step 1

First of all, create a page. Then edit the page and then click on Insert -> WebParts -> Under Content Roll Up- -> Click on Content Query web part.

SharePoint

 

Step 2

Now, let’s configure the web part. Edit the web part and select the list from which items should be displayed, in our case it's Employee Directory. Then you will have an option to select “Apply audience filtering” check that option and save the web part. Now, save the page.

SharePoint

 

Step 3

Once you will save the page then you can see the relevant items based on audience targeting set during creation of the item. If I have logged in with “Aakash” user then it belongs to Managers groups so Manager-1 item will appear on the screen.

SharePoint

 

Step 4

If I am logged in with Contoso user and this user is a member of Normal User groups then on the same page I will be seeing the item “Normal User-1”.

SharePoint

 

So you have seen the power of Audience targeting. This option is available in most of the WebParts in SharePoint. I have demonstrated with Content Query.

Summary

So in this article, I have explained the basic concept of Audience Targeting, also I have explained why we need the audience targeting in the real world. I have also explained how to use audience targeting in SharePoint list and Content Query Web Part by detail example.

If you have any questions or confusion then please do mention in the comment section.

In my next coming article, I am going to cover how ratings work in SharePoint in detail.

X

Build smarter apps with Machine Learning, Bots, Cognitive Services - Start free.

Start Learning Now