setPhoneNumber

fun setPhoneNumber(phoneNumber: String): Klaviyo

Assigns a phone number to the currently tracked Klaviyo profile

NOTE: Phone number format is not validated, but should conform to Klaviyo formatting see (documentation)https://help.klaviyo.com/hc/en-us/articles/360046055671-Accepted-phone-number-formats-for-SMS-in-Klaviyo

Whitespace will be trimmed from the value. Calling this method with an empty string or the same value as currently set will be ignored. To clear identifiers, use resetProfile.

The SDK keeps track of current profile details to build analytics requests with profile identifiers

This should be called whenever the active user in your app changes (e.g. after a fresh login)

Return

Returns Klaviyo for call chaining

Parameters

phoneNumber

Phone number for active user