I'm trying to use google website optimiser in umbraco within a page. As per google's instructions....
Page sections: Find the sections
in your page that you'd like to vary as part of your experiment.
Surround the source code of each section of your original content with
the following tags and give each section a unique name.
Paste the following immediately before the content that you would like to vary:
Paste the following immediately after the content that you would like to vary:
Don't worry about the unbalanced </noscript> tag, Website Optimiser is designed to work with this when it serves variations of your content. Learn more
For example, if you'd like to test a headline, your section might look like this:
<script>utmx_section("Headline")</script>
<h1>Buy This Product!</h1> </noscript>
This means that I need to be able to add a </noscript> tag without a starting tag. I've turned off Tidy, but umbraco still removes this tag. Any ideas how I can turn this off altogether?
I wouldnt normally recommend putting 'delicate' code like this into the editor directly, but the first thing I'd do would be to make sure that noscript is an allowed element in tinyMceConfig.config
Or, you can configure tinyMce by adding that tag to list of allowed elements in tinyMce (there's a config file in the /config folder of the umbraco installation), but I'd go with Chris's suggestion, add the code to the template/master template!
Thanks for the replies guys. Because the part with the noscript tag is part of the content we'll be switching it round a bit and I'd like to allow our marketing dept to decide on which parts they use with gwo. This means it can't really be part of the template.
I've added noscript and script to the tinyMce config file and the script part works fine now (albeit by automatically putting in CDATA), but because the noscript part is unbalanced (i.e. it has no start noscript tag by design - googles design) I think tinyMce is stripping it.
Where is the setting in tinyMce.config to turn off the Html cleanup? I've already disabled tidy in the umbraco config file.
Using unbalanced tags
Hi all,
I'm trying to use google website optimiser in umbraco within a page. As per google's instructions....
<h1>Buy This Product!</h1>
</noscript>
This means that I need to be able to add a </noscript> tag without a starting tag. I've turned off Tidy, but umbraco still removes this tag. Any ideas how I can turn this off altogether?
Many Thanks
Chris
Hi Chris,
Add your google code to your templates, rather than the RTE. This'll stop TinyMCE cleaning the markup.
Or... I believe there is a setting in config/tinymce.config that stops Tiny cleaning your markup.
I wouldnt normally recommend putting 'delicate' code like this into the editor directly, but the first thing I'd do would be to make sure that noscript is an allowed element in tinyMceConfig.config
Or, you can configure tinyMce by adding that tag to list of allowed elements in tinyMce (there's a config file in the /config folder of the umbraco installation), but I'd go with Chris's suggestion, add the code to the template/master template!
Cheers,
/Dirk
Thanks for the replies guys. Because the part with the noscript tag is part of the content we'll be switching it round a bit and I'd like to allow our marketing dept to decide on which parts they use with gwo. This means it can't really be part of the template.
I've added noscript and script to the tinyMce config file and the script part works fine now (albeit by automatically putting in CDATA), but because the noscript part is unbalanced (i.e. it has no start noscript tag by design - googles design) I think tinyMce is stripping it.
Where is the setting in tinyMce.config to turn off the Html cleanup? I've already disabled tidy in the umbraco config file.
Many Thanks
Chris
is working on a reply...