NEW YORK—Alphabet Inc.’s Google on Wednesday said it would keep alive for at least two years a tracking technology on its Android phones that is relied upon by advertisers, easing speculation about its plans after Apple Inc. frustrated the ad industry by restricting a similar tool. Google said it would give “substantial notice” before axing…