Hi John McRae
I dragged a HTML widget and added the script in it and the rest of the HTML code, save the code and publish the changes. It worked.
Let me know, if you have further queries. Hope it helps!