Forum Discussion
DRamirez
2 years agoPractitioner III
Nested custom attributes in Custom HTML messages
Hi everybody! I am currently working on a HTML multipage survey IAM. There are 7 different topics that i want to ask users their level of interest on (with a scale from 1 to 5). I was thinking of ...
Max
Specialist
Hey DRamirez,
Yes, it is possible! To do this, you need to store your information in a JSON object variable like this:
const json = {
"song_name": "Solea",
"artist_name": "Miles Davis",
"album_name": "Sketches of Spain",
"genre": "Jazz",
"play_analytics": {
"count": 1000,
"top_10_listeners": true
}
};
Next, you have to call the appboyBridge.getUser().setCustomUserAttribute() function like this:
appboyBridge.getUser().setCustomUserAttribute("most_played_song", json);
If you have questions, you can check out the Braze WebSDK documentation, since the methods are the same but modified for the appboyBridge usage. Let me know if you have any further questions! 🙂
Best,
Max
DRamirez
2 years agoPractitioner III
Hi Max! Thanks for the answer!
This is what I have been using and it seems to work perfectly for iOS, but for some reason, it will not work with Android. I contacted Braze eventually and the conclusion was that it was something that had to be requested in the product roadmap unfortunately 😅
Related Content
- 10 months ago
- 8 months ago