wp_script_add_data not working

the wp_script_add_data() method itself is not adding async attribute to the script tag. It just add a metadata to the script.

As examples were already given earlier in few answers the following could work for you:

wp_enqueue_script('pledge-js', 'https://www.pledge.to/assets/widget.js', array( 'jquery' ), null, true);
wp_script_add_data( 'pledge-js', 'async', true);

add_filter('script_loader_tag', 'async_scripts', 3, 10);

function async_scripts($tag, $handle, $src) {
    if (wp_scripts()->get_data( $handle, 'async')) {

        $tag = str_replace( '<script src', '<script async src', $tag );
        // you can do also: $tag = str_replace( '></', ' async></', $tag );
    }

    return $tag;
}

After you add the data to your script then you have to filter the script tag to add ‘async’ attribute to the script’s html tag (only at scripts which have that metadata ('async', true) added), so you can use this filter/function on many scripts where you want async attributes added to the tag.