Surfacing User Fields
As a matter of security, Lytics, by default, never surfaces any user fields that are available on a user's profile outside of the Lytics Audiences they are currently a member of. This information is returned by the Lytics JavaScript tag by default in order to facilitate integrations with web personalization, Facebook, Google, etc. That said, any of the fields available on a user profile can be surfaced to the browser by the Lytics JavaScript tag in order to unlock various site personalization use cases.
What can I do with surfaced fields?
Surfaced user fields open up a variety of use cases only limited by your own data and creativity. This technique is commonly leveraged to facilitate the pre-filling of forms, progressive profiling and a number of other custom, brand specific, use cases such as populating the item last added to cart or executing an event related to a user's last visit.
How do I surface fields?
Fields can be surfaced via the API section of your account settings. Simply visit https://activate.getlytics.com/accounts/<Your Lytics Account Number>/edit/api
From here type in the name of the field you want to surface and click Add.
See our documentation on editing your API account settings for detailed instructions.
How do I access surfaced fields?
Surfaced fields are returned alongside the current membership of Lytics Audiences via our JavaScript tag. For more information, see Accessing Visitor Profiles.
Using callbacks, the Lytics JavaScript Tag will return a data
object that contains an array of audiences as well as any additional field data that has been surfaced. For instance, if you are tracking the vehicles a user was looking to purchase, you might surface these fields describing those vehicles and pre-fill on-site searches for them.
By surfacing the fields Last Make
, Last Model
, Last Color
you might end up with a data
value that looks something like this:
{
"last_make": "audi",
"last_model": "rx8",
"last_color": "onyx",
"segments": [
"all",
"potential_buyers",
"high_momentum"
]
}
Looking for more? We have detailed documents on using this data with both the Lytics JavaScript tag and accessing entities from the server.