@Tomz it appears that you have added the code to the site's Header Injection instead of the homepage's Header Injection area.
To clarify, the code should not be added to Settings > Advanced > Code Injection > Header.
Instead, go to the Pages panel, and then find the site's homepage (not homepagem). Click the Settings [gear] icon beside the homepage name. When the Page Settings panel loads, click Advanced and you'll see a code injection area specific to this page.
If a post helps you, please click a "Like" option below ↘️