I have opened a block at the header of my site and have putted the GTM-container code inside while at Full HTML input-format.

Yet, the container code appears as regular text (<p>&<a>) in this block.

I could solve it by giving "Display:none;" to it's region with CSS, but I would prefer to find the root cause of this problem rather than using CSS.

If there is any module that deals with this service I would prefer not to use it since I'm looking for a none-modular why of doing it.

1 Answer 1


I've discovered that CKeditor made the code <p> so I tried to replace the <p> tag of the input to but it didn't help, so as alternative I tried to format the input as with PHP text-foramt, But this also didn't help.

Working solutions would be:

  1. Putting the code somewhere (at the first row for example) of you page.tpl.php.

  2. Installing the module.

If you plan to change your sites theme and going to change some themes in the near future, better pick option 2 --- It will save you from copying the code time and again to each new page.tpl.php.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.