1. A system for selecting content items based on prior interactions with information resources, comprising: a data processing system, having one or more processors, that: identifies a first plurality of content items based on a first match between a query and a keyword associated with the first plurality of content items, the query received subsequent to a client device performing a pre-specified interaction; identifies a second plurality of content items based on the first match and on a second match between an account identifier associated with the client device and a retargeting identifier of a retargeting set, the retargeting identifier included into the retargeting set responsive to the client device performing the pre-specified interaction; selects, from the first plurality of content items and the second plurality of content items, a content item based on selection criteria associated with each of the first plurality of content items and with each of the second plurality of content items, the second plurality of content items including the content item; and provides, to the client device, the content item to present on an information resource.
6. The system of claim 1 , wherein the data processing system inserts the retargeting identifier into the retargeting set, responsive to receiving an interaction data indicating that the pre-specified interaction with a code segment executing at the client device occurred, the client device associated with the retargeting identifier.