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.