Tracking code field Bug


I tried to add GTM code in the "before " and "after " fields located in Jupiter X > Control Panel > Settings > Tracking Codes.

(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= ''+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-XXXXXX');

Turns into this when i inspect the element:

(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({\'gtm.start\': new Date().getTime(),event:\'gtm.js\'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!=\'dataLayer\'?\'&l=\'+l:\'\';j.async=true;j.src= \'\'+i+dl;f.parentNode.insertBefore(j,f); })(window,document,\'script\',\'dataLayer\',\'GTM-XXXXXXX\');

Basically it’s escaping every special characters in the code.


We have made improvement to these fields in the latest update 1.0.3
Could you please update the theme and see if the issue still shows up?



Can confirm it works now.

Thank you :slight_smile:


Danish, could you please look at this again. It’s still broken. It’s breaking all of the analytics code and we’ve lost web site tracking for a week until it was discovered. Just accessing the Settings page on the Control Panel for JupiterX causes this.