Audience Targeting

Mature SharePoint environments can consist of hundreds or even thousands of users who constantly create new content while they collaborate on projects. The sheer amount of content can become overwhelming over time. SharePoint provides a mechanism, audience targeting, to address this problem. The archetypical example is the company calendar. In a large, diverse organization, different departments and corporate locations schedule events. Using the Content Query Web Part (CQWP), you can create a consolidated global view of all of these events. This way, those individual groups can publish their local events in a calendar at their local SharePoint site while providing a global rollup view of those events at the corporate portal. This sounds great, but consider this scenario: Your company consists of a number of manufacturing and administrative sites across the United States, including Texas and New Jersey. Each of these locations announces its New Year’s party, and these announcements are rolled up into a corporate portal site. The Texas plant obviously doesn’t care all that much about when or where the New Jersey office is holding their New Year’s party and vice-versa. It’s not exactly secret information; it’s just not relevant.

One way to solve this problem is to create two separate announcement lists. Create one “local announcements” list for items such as the New Year’s party. Create a separate list for those announcements that may be of interest to a wider community. Then, configure CQWP at the portal to ignore each location’s local announcements list. This works but is problematic for several reasons. Each content producer must be sure to use the correct list when making an announcement. People interested in those events must know to look into two different places for announcements—the portal and their local list. MOSS audience targeting provides a better solution.

Audience targeting allows content producers to indicate, on a per item basis, who should see content. Let’s tie this back to the previous announcements scenario. In a SharePoint environment that leverages audience targeting, the user who creates an announcement (the content producer) creates the announcement in the usual way. The producer accesses the announcements list and creates the audience targeted announcement just like any other announcement with one slight difference. In addition to specifying the title, the date, the description, and so on, the user also selects the audiences for which this announcement is relevant. If the user is announcing the New Jersey office’s New Year’s party, she creates the announcement as usual but specifies that this announcement is only relevant to the New Jersey office. The CQWP at the portal level reaches down into all of the sites, compares the target audience of each item against the audiences of which the current user matches, and displays that content if it matches.

In MOSS, audiences are a shared service and managed by the SSP. This means that like search and user profiles, audiences span site collections.

New users can find audience targeting a little mystifying and even frustrating at first. You can avoid that grief by following these three simple steps when working with audience targeting in MOSS:

1.
Define an audience. The audience must be defined before it can be used.

2.
Target the content. Upload documents, edit menu options, and otherwise indicate the relevant audience for a piece of content.

3.
Use an audience-aware Web Part to display the content. Web Parts and other SharePoint functions (such as menus) filter content on a user-by-user basis.

Defining Audiences

SharePoint provides four major methods for defining an audience:

  • SharePoint groups. Normally defined for security purposes, these groups can also be used for audience targeting.

  • E-mail distribution lists. Use a Microsoft Exchange e-mail distribution list.

  • Rules based. Via the SSP, define more complex rules defining audience membership. These rules can be as narrow as a specific user or more complex, using custom extended profile properties (as described earlier).

  • AD groups. Similar to e-mail distribution lists, content can be targeted to one or more Microsoft AD groups.

Of the four options, the rules-based approach is both more difficult and more flexible. This is properly an administrator function, but IT professionals should understand what this feature is all about. A rule is a set of “and” and “or” conditions that, in combination, define a slice of the pie that is a company’s user community. It’s possible and normal to combine multiple rules together to define an audience. By way of a plain English example, the rules-based approach allows organizations to define an audience named Integration Specialists that includes “anyone in the company who has listed BizTalk Server as one of their skills in their user profile.”

With this example, note how user profiles, My Sites, and audiences merge together:

  • User profiles include a property called skills.

  • Users update their skill property via their My Site.

  • System administrators, at the direction of a business analyst, create a MOSS audience by scanning through user profiles for any employee that meets the criteria.

Finally, much like search and user profile imports, audience membership must be calculated on a regular basis. Consider this scenario: On Monday, your company defines an audience of integration specialists. On Tuesday, a new employee joins the company who happens to be an integration specialist, meeting the criteria of the rule. Obviously, this new employee should be added to the integration specialists audience. Unfortunately, this doesn’t happen automatically. Instead, MOSS compiles audiences on a scheduled basis. In a properly configured SharePoint environment, Tuesday’s new employee should be added to the integration specialists audience by Wednesday.

To create an audience as described above, follow these steps:

1.
Access the shared service provider and select Audiences, as shown in Figure 7.15.

Figure 7.15. Pulling profiles using custom code from arbitrary sources.


2.
Click on Create Audience.

3.
Define the audience as shown in Figure 7.16.

Figure 7.16. Create an audience definition.


4.
Next, define one or more rules. For this audience, there is one rule, as shown in Figure 7.17.

Figure 7.17. Defining a rule for integration specialists.


5.
Compile the audience, as Figure 7.18 demonstrates.

Figure 7.18. Compile the audience.


At this point, you have successfully defined and created an audience named Integration Specialists that contains every employee who has listed BizTalk as one of their skills.

Now that we have an audience, we can target content to that audience.

Targeting Content

The process of targeting content in SharePoint varies based on the specific kind of content. SharePoint enables users to target many different types of content. Some of the most common include the following:

  • Entire Web Parts

  • Individual documents in document libraries

  • Individual list items (e.g., calendar lists)

  • Menu options

Let’s examine each of these in turn.

Targeting Web Parts

This next exercise walks you through the process of targeting an entire Web Part.

Most Web Parts can be targeted to an audience. This means that the Web Part itself can be configured to display itself or not display itself based on whether a given user visiting a SharePoint site belongs to the appropriate audience. In this exercise, you’ll walk through the following:

  • Defining an audience

  • Targeting a Web Part to members of that audience

  • Demonstrating that audience targeting is not the same as security

Setup:

Before you begin, make sure you can log into SharePoint as both a site administrator and a less privileged site visitor account. The site visitor should not have the same access rights to the site as the site administrator.

Define an Audience:

1.
Create a new site based on the blank template.

2.
Access People and Groups from the Quick Launch, as shown in Figure 7.19.

Figure 7.19. People and Groups link.


3.
Add a new SharePoint Group, as shown in Figure 7.20.

Figure 7.20. Add new SharePoint Group.


4.
In the field Name and About Me Description, enter “New York”.

5.
Leave the remaining fields at their default values.

6.
Click OK.

Create a Document Library:

1.
Click on the Document link in the Quick Launch.

2.
Click on the Create button.

3.
For Name, enter “New York Office Policies and Procedures”.

4.
Leave all other values as their default value.

5.
Click OK.

Add the Document Library to the Site’s Main Page:

1.
Return to the site’s main page.

2.
Click on Site Actions.

3.
Select Edit Page.

4.
Click Add Web Part. You will have two choices here. It does not matter which you select, but the figures show the Web Part as if the main “Add Web Part” link had been selected.

5.
Add the document library Web Part as shown in Figure 7.21.

Figure 7.21. Add the New York Policies and Procedures Web Part.


6.
On this newly added Web Part, select Edit.

7.
Select Modify Shared Web Part. This opens the tool pane on the right side of the screen.

8.
Scroll the tool pane down to the advanced section and open it.

9.
Scroll down again, if necessary, and enter the targeted audience of New York as shown in Figure 7.22.

Figure 7.22. Specify target audience.


10.
Click OK.

Test the Targeting Function:

1.
Log in as the site visitor, as shown in Figure 7.23.

Figure 7.23. Log in as another user.


Use the correct site visitor ID to do this.


2.
Go to the main page of the site.

3.
Note that the document library Web Part does not display.

4.
Log into SharePoint as the site administrator.

5.
Select People and Groups from the Quick Launch.

6.
Click on the New York group link.

7.
Click on the New button.

8.
Add the site visitor to the New York group.

9.
Sign in as the site visitor.

10.
Access the site’s main page.

11.
Verify that the document library displays.

Demonstrate That Audience Targeting Is Not the Same as Security:

1.
Sign in as the site administrator.

2.
Select People and Groups.

3.
Select the New York group.

4.
Click the check box next to the name of the user in the New York group.

5.
Select Actions -> Remove Users from Group.

6.
Confirm the action by clicking OK.

7.
Log in as the site visitor.

8.
Click on the View All Site Content link from the Quick Launch.

9.
Note that SharePoint displays the New York Policies and Procedures document library.

10.
Click on that link. This demonstrates that even though you didn’t see the document library Web Part on the site’s main page, you can still access that document library, proving that audience targeting is not the same as security. If the document library had been secured, you would not have seen it listed, nor would you be able to access it any other way.

Targeting Documents and List Items

Recall that document libraries include what you normally think of as “documents” such as Microsoft Word documents and Microsoft Excel spreadsheets. Document libraries are distinct from lists in that a list does not require a document. From an audience targeting perspective, however, they are the same.

You follow this two-step process to target individual items in document libraries and lists:

1.
Enable audience targeting for the entire library or list.

2.
Specify a target audience for individual documents or list items as required.

By default, document libraries and lists don’t enable audience targeting. Turn this feature on via the list’s settings, as shown in Figure 7.24.

Figure 7.24. Audience targeting settings.


First, access the setting from the General Settings screen.

Next, enable audience targeting, as shown in Figure 7.25.

Figure 7.25. Enable custom list for audience targeting.


After the library/list is enabled for audience targeting, SharePoint allows you to specify a target audience for each item, as shown in Figure 7.26.

Figure 7.26. Target individual item.


At this point, new MOSS users think they’re done. They’ve defined an audience. They’ve done some analysis and determined the lists and libraries whose content should be targeted. They’ve gone to the trouble of specifying target audiences on a number of specific documents and list items. However, when they go to test, it doesn’t appear to work. Every user sees every document or list item because libraries and lists don’t filter content by audience. Libraries and lists allow users to specify targets for content, but the libraries/lists themselves don’t implement audience filtering of any kind. MOSS provides other tools for that purpose, most notably the Content Query Web Part (CQWP).

When people learn that lists and libraries don’t provide any method to filter by audience, they often have a “What were they thinking?” moment. This is a perfectly natural reaction.


The CQWP is described in more detail in Chapter 5.

Menu Options

MOSS audience targeting also enables users to target menu items. In this way, site owners can define a custom set of options for anyone visiting their site, based on their role. This is done via the site’s navigation settings as described here:

1.
Click on Site actions, and select Site Settings.

2.
Under Look and feel, select Navigation.

3.
In the Navigation Editing and Sorting section, edit the properties of the menu item and update the target audience as shown in Figure 7.27.

Figure 7.27. Target navigation link.


4.
Select an audience, and click OK. Going forward, that menu option only appears to users belonging to that audience.

Using audience targeting on links is a little subtle. Both global and current navigation links can be targeted. However, they are separate from each other, so you need to target them separately.

Somewhat inconveniently, to target a particular link, you must add it manually. This means that if you add a document library for which you want to enable audience targeting, you can’t rely on SharePoint’s automatic menuing to do the job for you. You must configure the document library to be hidden via its own settings and then add the link manually via the site’s navigation.

Business Application

Let’s consider a business scenario and then apply audience targeting concepts to simplify things.

A multi-site manufacturing company is running SharePoint. The company has one large corporate office, home to most administrative users, management, and IT. The company has 20 manufacturing locations with minimal administrative staff at each facility. In addition, those minimal staff members fulfill multiple roles.

Like any good manufacturing company, workers’ safety is a major concern. To this end, the company creates a SharePoint site called “Safety.”

The corporate office provides most of the safety material in the form of policies and procedures. However, each individual plant maintains its own set of location-specific content. The content isn’t secret. If Dallas wants to view and read content produced by the Minneapolis plant, they are free to do so. However, Dallas doesn’t need to know the phone number of the Minneapolis fire department and vice-versa.

Audience targeting provides one approach to solve this problem.

First, we define our audiences. An e-mail distribution list probably fits well because the company has probably created one for each plant. Next, we create a document library for each individual manufacturing facility. Each document library is then added to the Safety site’s landing page. Finally, we set the appropriate target audience for each library.

The result is that when a member of the Dallas plant accesses the Safety site, she sees the Dallas plant’s safety information right on the home page. If she wants, she can still navigate to the Minneapolis document library if she wants (via View all site content). However, she isn’t presented with a cluttered view.

Audience Targeting Versus Security

Many novice MOSS users confuse audience targeting with security. They have a lot in common. AD groups, SharePoint users, and SharePoint groups can be a target audience. Entire libraries can be audience targeted. Menu options display or hide themselves based on audience membership. However, audience targeting isn’t security. Even though MOSS may use audience targeting to filter out a link to a document library, there is nothing stopping someone from guessing it or finding out the link some other way. After they do, they will be able to access that content. If you want to secure content, use MOSS security, not audience targeting.

It’s easy to confuse the two. If you target a piece of content (such as a menu link) to a particular audience, SharePoint will only display that content to members of the target audience. However, if they run a search that returns that link, they can still click on it and access the content behind it. SharePoint search, however, will not show a secured link this way. One way to think of this is that audience targeting is a convenience feature (don’t show content to people who don’t want to see it), whereas security is a prevention feature (don’t show content to people who should not see it).

Tips, Tricks, and Advanced Concepts

Audience targeting works well OOB. However, the SharePoint community has found problems, and better for all us, provided solutions. This section lists some of those problems and where you can go to find more information about them. Most readers of this book (IT professionals) won’t solve these problems on their own but rather point support staff (SharePoint administrators and developers) in the right direction.

Finally, as with nearly every MOSS feature, a strong developer-accessible API lies beneath it. Developers can use the API to extend MOSS audience targeting:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.89.173