Skip to main content

Hi,

I have a hosted preferences page. If someone unsubscribes and comes back to the hosted preferences page it will show their interests checked off even though they unsubscribed. So In my code I would like to do  an if statement that says if they are unsubscribed uncheck the interest checkboxes.

Is there away for me to pull  the user’s email subscription status ? I tried  {{ consent }}  but it doesn’t work.

Thanks

Hi @sherbert!
 

It will depend on how your hosted page/integration is set up, but you could potentially accomplish this by making an API call to the Get Profile endpoint, which can return a profile’s subscription status:

 

 

 

 

 

I hope this helps get you started!

- Brian


Thanks Brian!

I am using a custom hosted preference page template from within Klaviyo. Am I able to make API calls from that ?

Thanks


Hi @sherbert!

It’s theoretically possible, but it would likely require significant development effort. Here is a Community thread where a member established another custom workaround for a similar use case:

 

If you’re looking for further development help for your custom preference page, you can always reach out to one of our wonderful Official Klaviyo Partners!

 

Best,

Brian


Thanks Brian I’m checking into it!


Reply