How to import user attributes to create custom audiences

Sometimes, a specific list of user IDs needs to be included in a campaign or A/B test. Those users might not have a common trait we can target in an Audience, so we can update them with a custom user attribute for that purpose.

This needs to be done with consideration, as otherwise the limit of distinct user attribute names per app might be reached, after repeated use.



  1. Choose a custom user attribute. Example: custom_audience
  2. Append a unique value to it for each campaign/audience you need, using CSV import.
    *Appending is used only if preserving older values is required. Otherwise, simply overwriting the attribute value works 
  3. Build your audience based on users with attribute custom_audience that contains the imported value:


CSV file format:

Example shows how to append values to a user attribute. For how to update/overwrite it instead, see our documentation

  • Plain text:
  • Table view:
    userId userAttributeValuestoAdd
    user1 "{custom_audience:january_campaign}"
    user2 "{custom_audience:february_campaign}"
    user3 "{custom_audience:[january_campaign,february_campaign]}"
  • Check all requirements for a valid file here


CSV upload methods:

  1. Audiences page uploader
  2. Leanplum API CSV upload process
  3. Fast API method for up to 50 users at a time

Was this article helpful?
Have more questions? Submit a request