Braze JavaScript SDK
    Preparing search index...

    Function setCustomUserLocationAttribute

    • Sets a custom user location attribute.

      Parameters

      • key: string

        The identifier of the custom location attribute. Limited to 255 characters in length, cannot begin with a $, and can only contain alphanumeric characters and punctuation.

      • latitude: number | null

        The latitude of the user's location (valid values are between -90 to 90 degrees). Passing a null value for both latitude and longitude will remove this custom attribute from the user.

      • longitude: number | null

        The longitude of the user's location (valid values are between -180 to 180 degrees). Passing a null value for both latitude and longitude will remove this custom attribute from the user.

      Returns Promise<boolean | undefined>

      Resolves to a boolean that indicates whether the update was successfully enqueued. Resolves to undefined if the SDK is not initialized.