Patent ID: 8849865

Claim:
A method, comprising: identifying an impression database, the impression database including a plurality of entries, each entry associated with an impression, each impression being for a content item wherein each entry includes information associated with the impression including information related to an environment where the impression was served wherein the information related to the environment includes information related to a location where a user viewing the content item associated with the impression was located or a device used by the user to access the content item; identifying a plurality of content item attributes developed from the information, wherein each of the plurality of content item attributes is associated with a value, the content item being a web page and the attributes being information related to an environment where the impression was served; building a data tree based on the impression database and the plurality of content item attributes, wherein the data tree comprises a plurality of nodes, wherein each node represents a content item attribute and is associated with a quantity of content items included in the impression database that have the content item attribute; optimizing, by one or more data processing apparatus, the data tree to generate an optimized data tree by deleting one or more of the plurality of nodes based, in part, on respective quantities associated with the one or more of the plurality of nodes and compressing the data tree including identifying one or more of the plurality of nodes that have a quantity that is less than a predetermined number and creating a list to represent the identified one or more of the plurality of nodes; and determining, by the one or more data processing apparatus, the quantity of content items associated with the at least one of the plurality of nodes in the optimized data tree.