I built out a hosted page for users’ email subscription preferences. I am having trouble identifying the user on the hosted page. I would like to be able to show the end user the preferences that they already have on their profile. Has anyone had any luck with both identifying who the user is and then adjusting checked properties based on the users’ profile properties?
Hosted Page Identify User

Best answer by Brian Turcotte
Hi
Just to clarify the issue for myself and other Community members - are you able to track any users on the hosted page at all? If not, it’s probably because the Klaviyo.js snippet is not included on this page.
Since this sounds like a custom page, you may have to add the snippet manually using our Developer Guide here:
Once you are able to track the visitors, it may take some development work to complete the secondary part of your use case. In order to retrieve the profile’s properties, you could make an API call to the Get Profiles endpoint:
The final part (of altering the preferences to reflect the user’s properties) will depend largely on how you’ve set up the custom hosted page, but like the previous steps will likely require in-depth development in order to parse through the properties and pre-adjust the preference selections. Here are some resources that may help to get you started:
- Set up API-based website activity events
- Update profile identifiers via API
- Custom event tracking with JavaScript
If you feel you would benefit from extra development help, you’re always welcome to reach out to one of our wonderful Official Klaviyo Partners for assistance!
I hope this helps, and thanks for using the Community!
- Brian
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.