A computer-implemented method, comprising: receiving, at a data processing apparatus, display data specifying a display state of a web page in a viewport, the web page including a content item for display; determining, by the data processing apparatus, a proportional measurement from the display data, the proportional measurement being a measure of a first portion of the content item displayed in the viewport relative to a second portion of the content item that is not displayed in the viewport; determining, by the data processing apparatus, a zoom level measurement from the display data, the zoom level measurement being a measure of a zoom level of the viewport; identifying, by the data processing apparatus, display instances from the display data, a display instance being a display of at least a portion of the content item in a viewport, the display instances being identified based upon the zoom level measurement and the proportional measurement each exceeding a threshold; identifying, by the data processing apparatus, selection instances of the content item from the display data, a selection instance being a user selection of the content item; determining, by the data processing apparatus, whether a selection of the content item occurred during a display of at least a portion of the content item in the viewport based on the display instances and the selection instances; defining a selection of the content as a legitimate selection if the selection occurred during a display of at least a portion of the content item in the viewport; and defining a selection of the content as an illegitimate selection if the selection did not occur during a display of at least a portion of the content item in the viewport. receiving, at a data processing apparatus, display data specifying a display state of a web page in a viewport, the web page including a content item for display; determining, by the data processing apparatus, a proportional measurement from the display data, the proportional measurement being a measure of a first portion of the content item displayed in the viewport relative to a second portion of the content item that is not displayed in the viewport; determining, by the data processing apparatus, a zoom level measurement from the display data, the zoom level measurement being a measure of a zoom level of the viewport; identifying, by the data processing apparatus, display instances from the display data, a display instance being a display of at least a portion of the content item in a viewport, the display instances being identified based upon the zoom level measurement and the proportional measurement each exceeding a threshold; identifying, by the data processing apparatus, selection instances of the content item from the display data, a selection instance being a user selection of the content item; determining, by the data processing apparatus, whether a selection of the content item occurred during a display of at least a portion of the content item in the viewport based on the display instances and the selection instances; defining a selection of the content as a legitimate selection if the selection occurred during a display of at least a portion of the content item in the viewport; and defining a selection of the content as an illegitimate selection if the selection did not occur during a display of at least a portion of the content item in the viewport. <EOS>