They both make money and the advertiser hopes to gain customers while doing so.
Right. That's the whole premise behind online and offline (radio and TV and print media) ads.