Can't get Google Analytics code into my topics

Post here questions and problems related to editing and publishing DITA content.
ms2art2
Posts: 19
Joined: Tue Jan 14, 2020 6:44 pm

Can't get Google Analytics code into my topics

Post by ms2art2 »

Re this topic: https://www.oxygenxml.com/doc/versions/ ... ytics.html

I've followed the instructions on this page, but I can't get the content of the googleAnalytics.xml file to appear in my topic html. Instead, I see:

...

C:\Users\<my_name>\analytics\html-fragments\googleAnalytics.xml
</body>
</html>

What am I missing?
Costin
Posts: 846
Joined: Mon Dec 05, 2011 6:04 pm

Re: Can't get Google Analytics code into my topics

Post by Costin »

Hi Michael,

I've already replied on the comment you left on our User-Guide, so I am pasting here the reply.

This may occur if the XML that contains the HTML / Javascript resources is not well formed (for example, if the fragment contains special characters that could break well-formedness).
You can check if yout XML is well-formed, using the tool from oXygen XML. Just open the document in oXygen and go into the menu Document > Validate > Check Well-Fomedness.

As a workaround, you could embed the content into an XML comment. For more details on this technique, see the note from the Inline JavaScript or CSS Content subsection from the User-Guide.

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
Post Reply