I recommend using React Helmet. I've used it on a couple of Create-React-Apps, and it allows you to write actual script tags combined with vanilla JS.
It makes the process a lot smoother. So for you it'd be something like this once you've imported React Helmet.