403 forbidden access to website after installing Google Tag Manager code

I’ve been setting up the new Google Analytics 4 and Google Tag Manager on some WordPress websites. And I came across a weird problem.

After I added the Google Tag Manager code to the websites (using one of the Google Analytics plug-ins), I found that I could no longer view the front end of the website. I was getting a 403 Forbidden response.

My first thought was that the plug-in wasn’t adding the code correctly, so I tried a different plug-in. No joy, same problem.

Well, nothing else left to do but get my hands dirty and inspect the server logs.

It turned out that the Web Application Firewall rules that I was using (Comodo’s) had a rule that blocked the use of the <iframe> tag (a horrible tag from a security perspective). But disabling this rule got me access to the website’s front end.

Summary
403 forbidden access to website after installing Google Tag Manager code
Article Name
403 forbidden access to website after installing Google Tag Manager code
Description
After Google Tag Manager code was added to websites, viewing the websites returned a 403 Forbidden response.
Author
Publisher Name
Network Midlands Ltd
Publisher Logo
Share

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.