Audiences and audience targeting provide a nice compliment to user profiles. The idea of an audience is that it provides a basis for targeting content on a Windows Sharepoint Services site page to one group of users. For example, suppose there is an announcement or weekly sales figures that only sales people would be interested in seeing on the home page of a portal site. Audience targeting allows you to add content to a page that is displayed to some users but not others.
First, you must create audiences through the SSP admin UI which involves defining criteria that can be AND-ed or OR-ed together. For example, one audience can be defined as all users in the Active Directory group named Sales. Another audience can be defines by defining criteria on user profile properties such as all users with the word "sales" in their Title or their Department as defined within their Active Directory profile.
The process starts by navigating to the admin web site on Sharepoint and then opening the SSP admin console.
One of the options available on the SSP admin web site, should say "Audiences". Select this option.
The "Manage Audiences" web site provides a number of options that allow you to create and maintain audiences. There are basically three steps in implementing an audience:
- Create the audience and define the rules.
- Compile the audience to determine which users will form part of this audience based on the rules.
- Use the audience by connecting it to a web part like a document library.
Therefore the first step is to select the option called "Create Audience".
In the "Create Audience" configuration screen specify an logical name that will define whom will be part of this audience and provide a brief description. The other important thing is to select a user account that will have the right to redefine and maintain this "Audience" in the future.
On the next screen we are going to define the rules that will determine how the users are selected to join this audience. This can either be done on an inclusion or exclusion basis. The last two options buttons on the above screen shot is what will determine this. Once you done select "OK".
The rules that are used in audiences can be defined in two ways:
- User accounts and groups from Active Directory - this is done by selecting the "User" option button.
- Profile information stores in the SSP database - this is done by selecting the "Property" option button.
My explanation will be based around the profile database as this will be the more common use of audiences. There are a number of assumptions made at this point:
- An SSP has been define to import user information from Active Directory or another source into the SSP database. This is called profile imports.
- The "My Site" option has been enabled and users have all updated their profiles using this.
The drop down list box that appears below the "Property" option lists all the metadata fields as defined for the profile import. This therefore allows you to select the field that will contain data used for the comparison. Select the operator for comparison from the next drop down list box and then type the value into the textbox that you want to compare it with. Once you select "OK" then the rule will be defined.
Multiple rules can be defined and the stringed together using "AND" and "OR" operators, thereby allowing you to create very complex rules.
The last aspect of using audiences is configuring Web Parts to use them. On a Web Application that's configured with Microsoft Office Sharepoint Server and an SSP, each Web Part has an audience targeting setting at the bottom of the Advance settings section.
To do this, navigate to a Sharepoint Site that already has a document library defined or a similar web part. Complete the following steps to apply the audience:
- Switch the page into "Edit Mode"
- Add a web part into a "Zone"
- Select "Modify Shared Web Part" from the edit drop down menu on the web part itself.
- On the toolbox that opens on the right hand side, navigate down to advanced settings.
- Select an Audience in the "Target Audience" textbox by browsing for it.
- Apply the settings to the web part by selecting "OK"
- Exit "Edit Mode" of the page to test.
You should notice that the web part should disappear from the page if you are not a member of the audience that you applied to the web part.
Of course, Web parts do not provide the only means to make use of an audience. You can also write custom code against the Microsoft Office Sharepoint Server object model to programmatically determine whether the current user is in a specific audience or not. From that information, you can create a custom Web Part whose output is customized depending on what audiences the current user is in.
Also, Targeting now works with Windows Sharepoint Services sites that have been created in a Microsoft Office Sharepoint Server environment.
Overview of User Profiles in Sharepoint
Overview of Shared Service Providers in Sharepoint