Add a contentbox (free section you can download from the pagelines store) and add it into the drag and drop template for the 404 page. You can then add the required code into Pagelines>page options>404 so it only affects the 404 page.