Expand my Community achievements bar.

accessing profile data on the front end

Avatar

Level 2

Is there a way to access profile data on the front end ?

 

Something like user.profile_property == 'some value' ?

 

 

1 Reply

Avatar

Community Advisor

Hi @RJBu ,

There's two ways all depending on what your need is.

 

1) Response tokens allows you to send the values as part of the Target response and deliver an object that can then be read and acted upon using event listeners. see more here: https://experienceleague.adobe.com/en/docs/target/using/administer/response-tokens

 

2) Dynamic Tokens (not sure if that is the official name), but they allow you to dynamically set values in your offer. You inject them by using ${your profile variable here}. 

Let me give you an example with the geolocation. Assume you have a headline saying something along the lines:

Huge discount in all major cities today

By changing that, in the VEC to: 

Huge discounts in ${profile.geolocation.city} today

Will result in:

Huge discounts in Copenhagen today

Copenhagen will be dynamically set based on the users IP address.

You can even have a fallback value, which looks like this: ${profile.geolocation.city default="your city"}

 

Now back to your question. You can also expose profile scripts value using this approach: ${user.profile_script_name}

 

See more here: https://experienceleague.adobe.com/en/docs/target/using/experiences/offers/passing-profile-attribute...

 

I hope this helps!


I share weekly Adobe tips on LinkedIn—connect with me!

Every Wednesday: "Something a client recently asked..."

LinkedIn Profile