CMS pages in Magento allow you to modify the layout XML specific to that page. So, all you need to do is open up the CMS page in Magento that you want to add the javascript to, click on the “Design” tab on the left, and in the “Layout Update XML” field add the following code: