Problem inserting Amazon search box (javascript) into site

Amazon has a script where a search box is generated and links are generated that contain your affiliate ID. However, I’m having problems inserting it into the </body> section of a component.

When trying to save the script, this error is generated:
Error: Invalid CSS after “<”: expected 1 selector or at-rule, was ‘<script type="text/’
on line 1 of theme_field.scss
from line 1 of theme.scss
>> amzn_assoc_ad_type ="responsive_search_widget
^

Actual script is here (pertinent details removed):
<script type="text/javascript">amzn_assoc_ad_type ="responsive_search_widget"; amzn_assoc_tracking_id ="myforumname-21"; amzn_assoc_marketplace ="amazon"; amzn_assoc_region ="GB"; amzn_assoc_placement =""; amzn_assoc_search_type = "search_widget";amzn_assoc_width ="auto"; amzn_assoc_height ="auto"; amzn_assoc_default_search_category =""; amzn_assoc_default_search_key ="";amzn_assoc_theme ="light"; amzn_assoc_bg_color ="FFFFFF"; </script><script src="//z-eu.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&Operation=GetScript&ID=OneJS&WS=1&Marketplace=GB"></script>

Anyone shed any light on what I’m doing wrong?

My end goal is to hopefully, somehow have the amazon search box somewhere on a page, or every page (preferably in a single post but I know that’s unlikely to be possible).