Custom HTML not saving


(Joe Workman) #1

I have tried adding custom HTML to tag manager and its not saving. I cannot figure out why. I am trying to add the following code.

<script type="text/javascript" id="hs-loader">
window.helpShelfSettings = {"siteKey": "3zPkJmgm", "userId": "", "userEmail": "", "userFullName": "", "userAttributes": {}, "companyAttributes": {} }; (function() {var po = document.createElement("script"); po.type = "text/javascript"; po.async = true;
po.src = "https://s3.amazonaws.com/helpshelf-production/gen/loader/3zPkJmgm.min.js";
po.onload = po.onreadystatechange = function() {var rs = this.readyState; if (rs && rs != "complete" && rs != "loaded") return;HelpShelfLoader = new HelpShelfLoaderClass(); HelpShelfLoader.identify(window.helpShelfSettings);};
var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(po, s);})();
</script>

(Joe Workman) #2

My site will be going live this week and would really love to figure this out. When I click on the “Create New Tag” save button, the page jumps but nothing gets saved. I don’t see any errors that will help me pinpoint the issue.

I suspect that this is a possibly a bug in Tag Manager.


(Lukas Winkler) #3

Hi,

Can you check for errors in the Javascript console of your browser?


(Joe Workman) #4

I did not even think about looking there. I see a 403 error. I am logged in. Not sure why there would be a permission denied. Are you parsing the HTML and block certain things?


(Lukas Winkler) #5

Hi,

The 403 comes from your webserver and never seems to reach Matomo.

I’m pretty sure your webserver runs a WAF like mod_security that “protects” your server from requests containing HTML with Javascript.

Please check your webserver log and config to find out the exact details.


(Joe Workman) #6

Good shout! I don’t have mod_security but I am running Cloudflare and it was challenging the request. Thank you for pointing me in the right direction. It works now!