✨Discover storytelling in the AI age with Pixar's Matthew Luhn at Sanity Connect, May 8th—register now
Last updated March 10, 2021

Tailoring content for different audiences

By Ronald Aveling & Knut Melvær

Thinking about your audience as one group is a handy way get things done. But people’s needs change based on who they are, where they are, and what they’re really after.

This guide will show you how to tailor your content to meet the needs of different people. With personalized and localized content you can deliver better experiences across a wider range of cultures, languages, and tastes.

Personalization & Localization explained

Personalization

Personalization is when you send different content to your audience based on what you know about them. Depending on what you do, the knowledge you use can be from a variety of sources including:

  • Country or region of residence.
  • Preferred language.
  • Age or income group.
  • Past purchases.
  • Content they’ve favorited, or consumed earlier.
  • When they last interacted with you.

Protip

Only use data your audience has consented to share, or information that you can reasonably assume about them without harming their right to privacy.

How you personalize content for them is just as flexible. Here are a few ideas:

  • Offer special deals to high-value customers.
  • Recommend content based on a preference or past purchase.
  • Show different content to viewers from different places.
  • Communicate differently to people who haven’t interacted with you in a while.

Gotcha

Be mindful of assuming too much about somebody without having the data you need to support your assumptions. Sending the wrong personalized message to the wrong recipient may do more harm than good. If in doubt, apply the precautionary principle, and use something fit for all.

Localization

Localization is simply a form of personalization that focuses on content targeted towards your audience‘s location. You may have encountered localized content on a website, where applying a region or language preference lets you use the site in a way that makes the most sense for where you are.

While language translations are really common, localization can be much more than that. Great localization experiences can tailor news feeds, images, currencies, shipping settings, and much more in order to make the customer experience as relevant as it can be.

Example

CandiCorp’s subscription pilot is only being trialed in the EU‘s Nordic states. To avoid disappointing customers from other regions, they restrict the promotion of the program to website visitors and catalog recipients from these countries only.

How Sanity approaches tailored content

Sanity lets you tailor content in a way that makes the most sense to you. You provide tailored content exactly the same way you do other fields or types in your content model. It’s possible to choose between field and document level localization, or a mix of the two. Be as simple or complex as you like.

This flexible, needs-based approach should outlast a preconfigured solution in the long-run and is a pathway to better content experiences because you can blend personalization and localization needs any way you like.

Field-level customization

Tailored content can be as simple as adding new fields to your document, or an embedded object. Here‘s a Title field in English, Swedish, and Norwegian:

// schemas/documents/article.js

export default {
  title: 'Article',
  name: 'article',
  type: 'document',
  fields: [

    {
      title: 'Title',
      name: 'localizedTitle',
      type: 'object',
      fields: [
        { title: 'English', name: 'en', type: 'string' },
        { title: 'Norwegian', name: 'no', type: 'string' },
        { title: 'Swedish', name: 'sw', type: 'string' },
      ]
    },
    // etc...
  ]
}

Document level customization

You can also apply customization at the document level. This basic example lets you set the language type when creating a new document:

// schemas/documents/article.js

export default {
  title: 'Article',
  name: 'article',
  type: 'document',
  fields: [
    {
      title: "Language",
      type: "string",
      name: "language",
      options: {
        list: [
            {title: 'English', value: 'en'},
            {title: 'Norwegian', value: 'no'},
            {title: 'Swedish', value: 'se'},
          ]
      }
    },
    // etc...
  ]
}

These examples are simple, but the principles are extendable to any use case.

Localization & Personalization resources

What we learned

We learned that it’s possible to create tailored content for audiences of all persuasions. We broke down the difference between personalization and localization and looked at ways to provide for both using Sanity. Next up, we’ll customize Sanity Studio for faster flows and better content.

Sanity – build remarkable experiences at scale

Sanity Composable Content Cloud is the headless CMS that gives you (and your team) a content backend to drive websites and applications with modern tooling. It offers a real-time editing environment for content creators that’s easy to configure but designed to be customized with JavaScript and React when needed. With the hosted document store, you query content freely and easily integrate with any framework or data source to distribute and enrich content.

Sanity scales from weekend projects to enterprise needs and is used by companies like Puma, AT&T, Burger King, Tata, and Figma.

Other guides by authors