Page 1 of 1

Can't get Google Analytics code into my topics

Posted: Tue May 19, 2020 10:56 pm
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?

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

Posted: Wed May 20, 2020 12:16 pm
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