|This article supports Audience Studio - Legacy.|
The Profiles API enables your ability to increase personalized content based on detailed customer information. This REST API returns customer data in real-time and updates your segment information.
You can also use Profiles API to personalize your customers experience on your website. You can combine Treasure Data’s personalization feature with A/B Testing tools such as Adobe Target, Optimizely, or Google Optimize, to determine the version of your website that yields results.
When the underlying personalization workflow completes, the personalization data set is refreshed. You can see a current list of the segments to which a specific profile belongs. You can also see a list of attributes associated with the specific profile.
Learn more about Profiles API in this video:
The master segment must already exist in Master Segments. The master segment is the basis for all data accessed by Profiles API Tokens.
Navigate to Audience Studio > Profiles API Tokens.
Select New Token.
Complete the fields to configure the API token, including specifying a key column and the segments to which you want to apply personalization. Specify the attributes that you want the token to return values for. The token reads values from an app client or web page. The values are added to the profiles in Treasure Data.
You use Add Segment to associate the profile API token with one or more segments. The API Token returns attributes data to the profiles that match the specified key and that are in the specified segments.
Save your token.
audienceToken: List of Profiles API Tokens
keys: List of key columns
values: Object of values, attributes, key and audienceId
Your tool (such as Optimizely or Google Chrome Developer Tools) accesses the client to retrieve the segment IDs.
Copy tokens that you created and add them to your JS SDK script as follows:
Here’s the example output with Google Chrome Developer Tools.
To control the content that shows for specific customer segments, you can integrate Profiles API with other tools such as:
Profile Attributes are often used to call the Profiles API