type.inbound
and length(body.links) < 10
and any(body.links,
.href_url.domain.root_domain == "doubleclick.net"
and (
strings.icontains(.href_url.path, "/aclk")
or strings.icontains(.href_url.path, "/pcs/click")
or strings.icontains(.href_url.path, "/searchads/link/click")
)
and regex.icontains(.href_url.query_params,
'&(?:adurl|ds_dest_url)=(?:[a-z]+(?:\:|%3a))?(?:\/|%2f)(?:\/|%2f)'
)
)
Playground
Test against your own EMLs or sample data.