In the same way as Custom Stylesheets above, you can implement your javascript. Namely, the scripts can be used either for the header or/and the footer. Simply paste your code in the appropriate field (Custom Javascript Header, Custom Javascript Footer, Custom Javascript Tags in Footer, Custom Javascript Tags in Header).
NOTE: Your custom code needs to be put between script tags, Google DFP code can simply be pasted in the field.