Can't remove code I injected using custom HTML script from Google Tag Manager

Hi. As you may already know. Video is the most powerful media on the web right now. Google and other search engines crawl websites and pages with videos, more often than those who don’t have them.

As such. I wanted to add some videos to my site. I did this by using the YouTube embed code from within the share menu options on my chosen YouTube videos.

I then realized YouTube embed was pretty heavy and slowed down the pages considerably. In fact, the videos would load after 10+ seconds everything else had loaded. I tried to look for a better way to do this and found this tutorial:

I tried to follow the tutorial by doing two things. Adding the script portion using the google tag manager custom HTML option. And then adding the CSS portion under WordPress additional CSS option.

After replacing a couple of the videos with: <div class="youtube-player" data-id="VIDEO_ID"></div>

Inserting the correct VIDEO_ID which is the string after = on Youtube videos. I realized this procedure did not work.

I contacted BrainStormForce about this. They build astra templates. Including the one I used. Maybe they are able to give me some instructions I can follow to make this work.

One of the issues I’m trying to resolve. The code I added using tag manager is embedded at the bottom of all pages:

My understanding was that if I deleted or paused a tag. The code would essentially go away because it had not been triggered. This did not work this way though.

I also tried the backup settings within siteground with the aim to restore the website to an earlier version but this did not work either.

Has anyone had this happen to the? How did you fix it?

Appreciate your help.

PS: If you want to see how this looks live go to and scroll all the way to the bottom.

Cant visit your page, because your site thinks i’m a robot and then serves a broken captcha to try and ‘authenticate’ me.

Your code snapshot picture shows that your code is predicated upon there being elements in your code with the class ‘youtube-player’… so… if there are none of those, the code wouldnt do anything when your page loads, because it wouldn’t find any valid targets.

Must be wordfence which brings up the broken captcha. Does it do the same when you use an incognito or private window? Curious. I may have to revisit the wordfence settings.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.