5 ms·
Depends on the "ad product" being sold. For "I'll pay you to put this image on the page" ads you might not need JavaScript. For "I'll pay you if someone clicks
by IX-103 5y ago
Depends on the "ad product" being sold. For "I'll pay you to put this image on the page" ads you might not need JavaScript. For "I'll pay you if someone clicks on the ad" it might also be possible. For "I'll pay if the visitor sees the ad on the page" (which requires the ad to know if it is in the viewport), then JavaScript is 100% necessary. Likewise for "I'll pay you if you show the ad and then the person you showed it to buys the advertised item within the next 30 days". L
The ads market is a very complex and competitive industry. This means that practically every display side provider has their own special "ad product" to differentiate themselves. Almost all of these require JavaScript to implement their key features.
In addition there could be 4 or even more parties involved in showing an ad (publisher, publisher's supply side provider, advertiser's display side provider, advertiser, plus miscellaneous middlemen). These different parties may not trust each other, so they currently use JavaScript to send (via `fetch`) themselves information about the auction to check up on each other.