A method for automatically managing placement of content slots in an information resource in real-time, comprising: receiving, by a data processing system, from a client computing device, a request for content comprising a request for a third-party content item, responsive to the client computing device: i) transmitting to a server of a content publisher of an information resource or a server hosting an information resource a request for an information resource, ii) receiving an information resource from the server of a content publisher of the information resource or the server hosting the information resource, wherein the information resource includes a first third-party content slot including computer-executable instructions to cause the client computing device to generate and transmit a request for content to the data processing system, iii) executing the computer-executable instructions as part of the information resource and sending a request for content to the data processing system, wherein the request for content comprises a request for a third-party content item from the data processing system; transmitting, by the data processing system, a content slot insertion script together with a third-party content item to the client computing device, the content slot insertion script, when executed on the client computing device, causing the client computing device to: identify a Document Object Model tree of the information resource; identify one or more DOM elements included in the DOM tree; determine, based on the identified DOM elements, one or more candidate third-party content placement locations according to a third-party content placement policy; select, from the candidate third-party content placement locations, a third-party content placement location in the DOM tree; insert a second third-party content slot at the selected third-party content placement location; and display the third-party content item at the second third-party content slot. receiving, by a data processing system, from a client computing device, a request for content comprising a request for a third-party content item, responsive to the client computing device: i) transmitting to a server of a content publisher of an information resource or a server hosting an information resource a request for an information resource, ii) receiving an information resource from the server of a content publisher of the information resource or the server hosting the information resource, wherein the information resource includes a first third-party content slot including computer-executable instructions to cause the client computing device to generate and transmit a request for content to the data processing system, iii) executing the computer-executable instructions as part of the information resource and sending a request for content to the data processing system, wherein the request for content comprises a request for a third-party content item from the data processing system; transmitting, by the data processing system, a content slot insertion script together with a third-party content item to the client computing device, the content slot insertion script, when executed on the client computing device, causing the client computing device to: identify a Document Object Model tree of the information resource; identify one or more DOM elements included in the DOM tree; determine, based on the identified DOM elements, one or more candidate third-party content placement locations according to a third-party content placement policy; select, from the candidate third-party content placement locations, a third-party content placement location in the DOM tree; insert a second third-party content slot at the selected third-party content placement location; and display the third-party content item at the second third-party content slot. identify a Document Object Model tree of the information resource; identify one or more DOM elements included in the DOM tree; determine, based on the identified DOM elements, one or more candidate third-party content placement locations according to a third-party content placement policy; select, from the candidate third-party content placement locations, a third-party content placement location in the DOM tree; insert a second third-party content slot at the selected third-party content placement location; and display the third-party content item at the second third-party content slot.