How to import user attributes for creating ad hoc campaign audiences

Sometimes, a specific list of user IDs need to be included in a campaign. As those users might not have any attributes we can use to build an audience from, we can update them with a custom user attribute.

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

 

Steps:

  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:
    Screenshot_2021-06-28_at_23.41.51.png

 

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:
    userId,userAttributeValuesToAdd
    user1,"{custom_audience:january_adhoc_campaign}"
    user2,"{custom_audience:february_adhoc_campaign}"
  • Table view:
    userId userAttributeValuestoAdd
    user1 "{custom_audience:january_adhoc_campaign}"
    user2 "{custom_audience:february_adhoc_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