1. Home
  2. Docs
  3. Javascript API
  4. setUserData()

setUserData()

The Prompty.setUserData(name = ”, email = ”, externalId = ”) function allows you to set a subscriber’s name, email address or external ID, using data from your application or a subscription form. This function must be called before a user completes their subscription to be effective. All values are optional and empty strings will be ignored.

<script>
Prompty.setUserData('John Smith', '[email protected]', '1234');
</script>

Was this article helpful to you? Yes No

How can we help?