Earlier quoted context omitted.
It’s simple. You use a URL with the campaign id, and store that when the customer clicks through, then when a sale is made you count that towards the campaign. In offline advertising people would achieve this using campaign-specific phone numbers or discount code given in the ad. Online advertising math is not rocket science. If ROAS is positive you continue the campaign, if not you abandon it or try other methods.
Direct conversion to sale via clickthroughs are an almost invisibly small part of online ads . No advertiser uses only that metric for determining ROAS.
I can’t speak for ad agencies, but every company I’ve worked with to do advertising measured ROAS using customer attribution (which ad campaign brought which customer, and how much did that customer spend).