Serve events contain data pertaining to the serve, eg. the
serve ID, query, user, ads, etc. The click events, on the
other hand, only contain information about the click, and
additionally the serve ID of the serve associated with the
click. To compute CTR at the query-ad level in S4, we need
to route click and serve events using a key composed of the
query and ad ids. If the click payload doesn’t include query
and ad information, we need to do a join by serve ID prior to
routing the events with query-ad as the key. Once joined,
the events must pass through a bot filter. Finally, serves and
clicks are aggregated to compute CTR