If you integrate a script / function / element in the header or footer file, it will be used globally on all pages. With the following script you can limit this only on certain pages.
<?php if ( is_page('ID OF THE DESIRED PAGE') ) { ?> <!-- Here comes the script in --> <?php } ?>