When a website pays a search engine to boost results to it's page for certain keywords, how does both the search engine and website reconcile these results in a way that they both trust each other?
My first thought would be that the search engine uses the referrer HTTP header, so that the website knows the traffic came from the search engine. But the website could just be lying about how much traffic they received from that referrer.
Likewise the search engine could just create fake traffic that they send to the website to make it look like it was real traffic, and then charge them for it.
So how do search engines and websites actually account for real traffic from the search engine to the website in a way that they mutually trust the results?