主权项 |
1. A method for selecting and serving a content item based on a determined content item size for a resource, the method comprising:
serving, using a processing module, a script to a client device in response to a request, the script configured to:
determine a size of a viewport,determine a width of a parent element of a resource, anddetermine a content item size based, at least in part, on the size of the viewport and the width of the parent element; receiving, at a processing module, a dimension of the determined content item size; determining, using a processing module, a set of content items based, at least in part, on the received dimension of the determined content item size selecting, using a processing module, a content item from the determined set of content items; and serving, using a processing module, data to effect display of the selected content item in the parent element with the resource. |