Audiences—User Attributes

At a glance: User Attributes provide advertisers a way to segment audiences using static or dynamic characteristics available from users or your CRM systems. By making this first-party available within Audiences you enrich your ability to segment and cohort users. 

UserAttributionNavigationXL3_us-en.png

Related reading: Audiences 

User Attributes

 

User attributes, unlike event-based data, are general characteristics shared with you by your users. They can be static, like gender, age, birthday, and country; or dynamic, like the user score in a game.

User attribute data is:

  • Updated using CSV file upload or JSON via API. 
  • Stored in a hashed form.
  • Available for use in any audience ruleset

User attributes are housed at either the app-level or account-level as described in this article. If using app-level attributes, the team member requires app permission to manage and use the attributes. 

A detailed explanation of User Attributes is made via the following scenario. 

Scenario—app marketer requirements

You, the app marketer, are busy with the following:

  • Maintaining 2 gaming apps: game_a and game_b.
  • Launching game_c
  • Targeting current app users with these user attributes:
    • Favorite sport: Cricket
    • Current game score: 15 or more in one of the current games

The table contains user-attribute data from your CRM. Audience rulesets need access to this data. 
UserAttributuesExample_us-en.png


Use CRM data in rulesets

In Audiences, create user attributes (favorite sport and game score). This gives ruleset access to CRM data. 

Scenario user attributes
Name Format Level
Game score Number: Lets you set rules like 'ScoreGameB is greater than 29'.

App-level: User's score is recorded for each game played.

Meaning: ScoreGameA, ScoreGameB.

Favorite sport

String: Lets you set rules like 'whose favorite sport is tennis'.

Note! Values are case-sensitive.

Account-level: User's favorite sport is the same regardless of the app.

Note! A user can have only 1 value associated with account-level attributes.

User attributes in rulesets

User attributes act as filters in secondary rules. This example uses criteria (favorite game and game score) set by the marketer. 

UserAttributedExample.jpg

Implement User Attributes

Set up, add, manage, and delete user attributes.

Set up

Prerequisite:

To manage app-level attributes, a team member must have app permission. 

To set up user attributes follow these procedures: 

  1. Add user attributes.

  2. Do one of the following

  3. Implement user-attributes in rulesets.

Add

To add user attributes:

  1. Go to Audiences > User Attributes tab.
  2. Click Add User Attribute.

    UserAttributeAdd.png

  3. Complete the fields. Field characteristics are listed in the table that follows. 
    • Attribute name
    • Format
    • Level
  4. Click Save.
User-attribute fields
Field Characteristics
Attribute name
  • English characters only
  • No punctuation or special characters
  • Same name cannot be used at both the app- and account-level
  • Same name can be used at the app-level; e.g., above scenario use of ScoreGameA and ScoreGameB
Format
  • Text: Test if the attribute value is or is not equal to a specified rule value. Example: Is cricket or is not cricket.
  • Number: Test if the attribute value is greater than, less than, or equal to a specified rule value. Example: Score greater than 15
Level
  • Account-level: An attribute has no connection to the app.
    Example: gender, favorite sport
  • App-level: An attribute is app-related. Select the apps associated with the attribute. 

Manage

To manage user attributes, go to Audiences > User attributes tab.

AudiencesUserAttributes_us-en.png
Manage user attributes
Function Description
Search and filter

By attribute name, app name, and attribute level.

Sort by  Click a column header to sort table rows.
Upload data
Change API import key 

To change the API import key:

  1. Click Upload data.
  2. Select API.
  3. Click Refresh import key. 

Note! If scripts have embedded keys, make sure to update them with the new key. 

Delete

AppsFlyerAdmin_us-en.pngDelete

Only the admin can delete an attribute. To delete an attribute that is part of a ruleset:

  1. Remove the attribute from the rule-set.
  2. Delete the attribute.

Upload data

Upload field specifications

User-attribute field list
Field Content Format Add data
by CSV
Remove data by CSV
device_id 

Includes 1 of these user IDs:

  • IDFA
  • GAID
 Text Mandatory Mandatory
customer_id  AppsFlyer customer user ID  Text

Optional (leave blank)

Optional (leave blank)

app_id

App-level attribute: App ID as it displays in the dashboard.

For iOS apps, include the prefix ID

Account-level attribute: Always populate with * 

Text Mandatory Mandatory
attribute_key User-attribute name, exactly as it displays on the user-attributes tab. Text Mandatory Mandatory
attribute_value Assigned value Text Mandatory Don't send

Upload data by CSV

User-attribute data is added or removed via a CSV file. The figure and example CSV file that follows, match the scenario describing the feature in this article.

User-attribute-example.csv

FileForAttributes.png

CSV file requirements

  • No header row
  • Contains all the columns listed in the preceding table. 

To upload a CSV file:

  1. Click Upload data.
  2. Select CSV.
  3. Select either:
    • Add data
    • Remove data 
  4. Choose a CSV file to upload. 
  5. Click Upload; an upload status message will appear. 

Upload data by API

This upload method requires a request URL and JSON with user-attribute data.

  1. In the dashboard, get the prepared API request calls and JSON template.
  2. Populate the JSON template with your data according to the field specifications

To generate the API request URL and JSON template:

  1. Click Upload data.
  2. Select API.
  3. Select an action:
    • Update user-attributes: Overwrite or add.
    • Remove user-attributes.
    • Remove user data: Removes all data relating to a specific user. User is identified by their AppsFlyer ID.
    • Remove app data: Removes all data at the app level. 
  4. Copy the generated API request URL.
  5. Copy the generated API request body.
  6. Prepare the JSON (with its user-attribute data) using the specified JSON format. For account-level attributes set "app_ids": ["*"]
  7. Prepare the API call based on the URL and request body.
  8. Send the request programmatically.
Example request and JSON
https://hq1.appsflyer.com/user-attributes-import-api/set-user-attributes
{
  "import_key": "c733e4d7-b538-4d12-a2ef-ffffffffffff",
  "attributes_values": [
    {
      "device_id": "",
      "customer_id": "",
      "app_ids": [],
      "attributes": [
        {
          "attribute_key": "",
          "attribute_value": ""
        }
      ]
    }
  ]
}

Limitations

User-attribute data can't be printed or downloaded.

Was this article helpful?