Considerations for Audience Targeting in Aura Sites

Audiences are a great help when you want to target specific user segments with relevant site content. As you work with audiences, there are some things to consider.

Required Editions

Available in: Salesforce Classic and Lightning Experience
Available in: Enterprise, Performance, Unlimited, and Developer Editions
Applies to: Aura sites

General Considerations

  • You can create up to 1,500 audiences per site. To locate an audience in the Assign Audiences window, you can search using the % wildcard. You can also sort audiences by name or creation date.
  • You can’t assign audiences to the components in the template header and footer sections.
  • Custom object records aren’t automatically available in partial copy sandboxes and can cause issues with audiences that reference the custom objects. To avoid this situation, follow one of these recommendations.
    • Include the custom object data in your sandbox.
    • Temporarily remove the criteria that reference the custom object.
    • Edit records that include the custom object, and delete the data in the custom object lookup field.
  • After you publish your site, a slight delay can occur as your site loads, during which you see the default version of a page, component, or branding set. In this case, wait a bit and reload the page.
  • When an audience contains record-based criteria, field-level security that’s applied to criteria in the audience can restrict site visibility based on those field-level security settings. However, when an audience contains only user-based criteria, field-level security settings don’t restrict site visibility.

Location Criteria Considerations

  • The user’s IP address, which can be in a neighboring geographical area, determines the location.
  • The location permission isn’t on by default in Developer Edition orgs. Contact Salesforce if you want to use this feature in that edition.
  • Some countries don’t permit use of the Google API. Location criteria don’t work for those regions.
  • Custom location fields aren’t available for use as audience criteria.
  • Keep location criteria broad. If an audience that’s limited to a particular city is unlikely to get much traffic, try using a larger geographic area, such as a state or a country. Or create one audience with multiple cities or states in the location criteria.
  • If you use an external CDN service, you must set the True-Client-IP header in your external CDN. Audience targeting can return unexpected results without this header. Refer to your CDN provider documentation for help with setting up headers.

Domain Criteria Considerations

  • Available domains are created in Salesforce and associated with a site through a custom URL.
  • Domain criteria aren’t available in Developer Edition orgs.

Record-Based Criteria Considerations

  • Record-based criteria use record fields, such as opportunity amount, not user fields, such as role.
  • You can assign an audience that includes record-based criteria only to a record detail page or a variation of that record detail page.
  • You can’t assign an audience that includes record-based criteria to a branding set or component. Audiences that include record-based criteria don’t appear on the list of audiences to choose from.
  • When you create an audience from a component or branding set, record-based criteria aren’t available for selection.

Audience Criteria Considerations

  • If an audience contains record-based criteria, you can’t use that audience as a criterion in another audience.
  • You can’t use an audience as a criterion for itself.
  • An audience that’s used as a criterion for another audience can contain up to 10 criteria.
  • Audience criteria can be only one level deep. For example, you have three audiences: a California User audience, a Partner audience, and a Dog Owner audience. You can use Dog Owner as a criterion for Partner. However, you can’t then use Partner as a criterion for California User because Partner already contains an audience criterion: Dog Owner.
  • Layering audiences can be tricky. For example, if you have a San Francisco audience assigned to a page variation, all your users in San Francisco can see the page. If you add “company name” as a criterion to a component on the page, that component is visible only to users in San Francisco who work for that company. If you assign a California audience to the component, no one outside San Francisco can see the component because the entire page is assigned to the narrower San Francisco audience.