简体   繁体   中英

How to prevent Joomla from stripping HTML Comments

I've tried to add the DoubleClick tracking code

<!--
Start of DoubleClick Floodlight Tag: Please do not remove
Activity name of this tag: GVA - Homepage
URL of the webpage where the tag is expected to be placed: http://www.gva.co.uk
This tag must be placed between the <body> and </body> tags, as close as possible to the opening tag.
Creation Date: 07/25/2016
--><noscript><iframe src="https://xxxxxxx.fls.doubleclick.net/activityi;src=xxxxxxx;type=gvaco0;cat=gva-h0;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;ord=1;num=1" frameborder="0" width="1" height="1" style="display: none;"></iframe></noscript>
<!-- End of DoubleClick Floodlight Tag: Please do not remove —>

to Joomla. I've added it to the template file and within the JCE text editor in the CMS and in both cases it seems to completely remove the HTML Comment tags and as such the code isn't detected by Google Tag Assistant.

I've checked Joomlas text filtering options but can't prevent it from stripping the tags. Does anyone know what I'm doing wrong?

Cheers :)

In the JCE global config you need to do these changes

  • Validate = Yes
  • Doctype = HTML5
  • Entity Encoding = Unicode (UTF-8)

Hope you have already completed the step in GLobal Configuration-Text Filters setting Admin to "No Filtering"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM