Tips for Valid XHTML Snippets for External Tracking

This article applies to Classic Commerce. (Looking for Contextual Commerce documentation?)

A few tips for valid XHTML code:

  1. Each element must be a single element. For example, the following code will not validate:


    In order to make the code validate, you must add a <div> tag around the non-single elemnets, as shown below.

  2. With the newer XHTML standards, you cannot just include JavaScript between the script tags without potentially breaking validation. To fix this problem, use the tag <![CDATA[ ...]]> around the JavaScript code, as shown below.



Powered by Zendesk