Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chris Pont 4 posts 32 karma points
    Aug 24, 2009 @ 17:24
    Chris Pont
    0

    Using unbalanced tags

    Hi all,

    I'm trying to use google website optimiser in umbraco within a page. As per google's instructions....

     

    • Page sections: Find the sectionsHelp
      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?

     

    Many Thanks

     

    Chris

     

  • Chris Koiak 700 posts 2626 karma points
    Aug 24, 2009 @ 17:31
    Chris Koiak
    2

    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.

     

  • dandrayne 1138 posts 2262 karma points
    Aug 24, 2009 @ 17:34
    dandrayne
    0

    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

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Aug 24, 2009 @ 17:35
    Dirk De Grave
    2

    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

  • Chris Pont 4 posts 32 karma points
    Aug 25, 2009 @ 10:28
    Chris Pont
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft