This was posted in Show HN today [0]. Looks like queries just query ChatGPT themselves for whatever terms they want to track and then correlate revenue with that. But ChatGPT will probably do it like affiliate links, where there is a tracking parameter or cookie that identifies that it came from ChatGPT.
[0] https://news.ycombinator.com/item?id=46642490