You’re trying to use a sledgehammer to crack a nut.
There is no need for a plugin, you can execute Javascript from a theme component, which is more easy.
There is no need for Javascript if you’re just writing out HTML to your header, you can just add it in Common - Header in your theme component.