How to add scripts in a theme page
The safest and simplest way to add a script in the theme pages is to use a free plugin like "Shortcoder" what converts your script in a shortcode and then place this shortcode in an "HTML module". This will avoid the theme file alterations and multiple malfunctions caused by some wrong scripts enqueue.
The following example can be used for a website counter script, MailChimp form script, etc.
If you need to add a certain CSS or JS code in the website header or footer, please consider using the "Simple Custom CSS and JS" plugin.