Using the RTP User Context API
Quite a few people have asked recently what a good use case is for using RTP's User Context API, Document here on the developer site.
At a high level, what the User Context API allows us to do is store bits of information about a (typically anonymous) user within RTP, and then leverage those bits of information for segmentation. Obviously RTP's set of data about an anonymous user is rich, but there could be custom items we might not return. Here are some examples:
- RTP doesn't return longitude and latitude, but other 3rd party products might. If that's important in the context of a campiagn, you could choose to store those in two "custom" variables
- RTP doesnt know if an anonymous visitor is a customer... but other 3rd party products might. In that case, you could use that 3rd parts's API to get that information, store it in a custom variable.. then segment on it.
When you're building your segment, here's how you use all this information
Step 1: Look under API for User Context API
Step 2: Drag over User Context API

Step 3: Choose the custom variable you're storing your data in

Step 4: Choose the value in the fiedl you want to segment on!


You can then create a campaign based on this segment and serve up the right content to the right people! The User Context API is not on by default.. so talk to your support rep to get that enabled.
Its important to note that the custom fields in RTP are actually named "Custom 1" - "Custom 5". Whatever data you get from your other source is just placed in a variable with that name, then used.
