I have gone through the Javascript object but not getting much information about it. I am trying to add user to list using javascript object. Is it possible or should I use API?
Best answer by KeviSunshine
View originalI have gone through the Javascript object but not getting much information about it. I am trying to add user to list using javascript object. Is it possible or should I use API?
Best answer by KeviSunshine
View originalHi
Do you mean you’re trying to import via a JSON object?
To add a user to a list, you can import a CSV file, manually add users, or use the API to send your JSON in bulk.
Depending on what your use case is, it sounds like converting your JSON to CSV or using the API would be best.
Cheers,
Kevin.
Hello Kevin,
I am not importing any CSV. I have create account form in frontend and have a field where customer has to select an option “Subscribe to list”.
My main query is can we use Klaviyo JavaScript object in frontend to add a new user to specific list?
Here is the link of Klaviyo JavaScript Object.
https://developers.klaviyo.com/en/v1-2/docs/introduction-to-the-klaviyo-object
H
Oh! I understand! You’re asking whether there’s a function provided by the Klaviyo object that allows you to subscribe someone to a list. The answer is no: you cannot subscribe someone to a list using the Klaviyo object.
You can create profiles in Klaviyo using the `identify` method and track events using the `track` method, but you’ll need to use a custom API call to subscribe profiles to lists.
Best,
Kevn.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.