XHTML Compliant Code

Certain scenarios may require you to use a version of the ClickTale Tracking Code that is XHTML-compliant.

The most common of those is implementing the code through a Tag Management service (Google Tag Manager, Ensighten, Tealium, TagMan, to name a few). This is becoming common practice for websites with multiple tags to be deployed throughout the site. XHTML-compliant code is required to allow the Tag Management service to deploy the tag in an asynchronous manner, after the page code is loaded. The advantage of the asynchronous code is that it's guaranteed never to get in the way of other parts of your web page loading. This means that users will be able to load the content of your pages, even if they’re having trouble loading the tags. Mobile users in particular will enjoy less latency when loading web pages.

NOTE - The XHTML-compliant property is set on a Project level, so your various projects may have different settings.

If you need to use the XHTML-compliant version of the ClickTale Tracking Code, proceed as follows:


 * 1. Access the Project Settings > Advanced Settings sub-menu in the project involved.


 * Advanced Settings.png


 * 2. Scroll down to the checkbox marked "Load ClickTale code asynchronously (XHTML compliant)".


 * XHTML compliant.png


 * 3. Check the checkbox and click the SAVE button at the bottom of the page.


 * 4. You should get a pop-up message describing the change. Click OK.


 * XHTML code OK.png


 * 5. Access the Project Settings > Setup & Code sub-menu.


 * 6. In the Project setup page click the right-most link - "Recommendation & Code".




 * 7. The bottom code is now in the XHTML-compliant format. Copy it and paste into your pages or into the Tag Management service.

Note - You can change the code back to the regular format at any time by un-checking the checkbox marked "Load ClickTale code asynchronously (XHTML compliant)" in the Advanced Settings.

When you click SAVE after switching back, the following message will display:



Click OK to close the message. The generated bottom code will now be the regular, non-XHTML-compliant version.