• Resolved Kevin Perrow

    (@kperrow)


    Just reporting
    Optimize HTML Code option enabled causes Google Remarketing Tag to not work correctly – Google doesn’t read the <![CDATA[ code. Soon as i disable that section it works perfectly.
    Thanks

Viewing 1 replies (of 1 total)
  • Plugin Author Frank Goossens

    (@futtta)

    As per Google’s Q&A on the subject;

    While most browsers can properly render the AdWords Remarketing snippet in the absence of CDATA comments, other browsers will fail to properly execute the script.

    The problem actually is specific to sites (themes) that follow the XHTML-spec (instead of the HTML5-one), in which case some characters in the javascript code need either to be escaped or the JS should be put inside a CDATA-section (see this StackOverflow answer).

    The conclusion; in reality 99% of sites don’t need the CDATA-section and hence AO’s HTML optimization indeed removes them. If you want that CDATA to remain in place (i.e. if your theme uses XHTML), you’ll indeed have to disable HTML optimization.

    Hope this clarifies 🙂
    frank

Viewing 1 replies (of 1 total)

The topic ‘Optimize HTML Code And Google Remarketing Tag Issue’ is closed to new replies.