<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Insert custom code in page template]]></title><description><![CDATA[<p dir="auto">Hello</p>
<p dir="auto">I would like to insert some visitor tracking code (for [url=<a href="http://piwik.org/" rel="nofollow ugc">http://piwik.org/</a>]Piwik open source analytics actually) into the &lt;head&gt; of each Mango html page (DGLux too, if I can).</p>
<p dir="auto">Is this possible and if so, what's the best way to go about it?</p>
<p dir="auto">Thanks!</p>
]]></description><link>https://forum.mango-os.com/topic/1758/insert-custom-code-in-page-template</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Apr 2026 20:57:22 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/1758.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 13 Nov 2014 19:09:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Insert custom code in page template on Sun, 16 Nov 2014 07:43:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/joelhaggar" aria-label="Profile: JoelHaggar">@<bdi>JoelHaggar</bdi></a> said:</p>
<blockquote>
<p dir="auto">You can make a copy of the new tag file and put it in overrides/web/WEB-INF/tags/page.tag and this way it won't be overwritten but you run the risk of not getting a needed update file.</p>
</blockquote>
<p dir="auto">I'd rather get the updated file and have everything work smoothly, so I've been making a note of my 'customisations' so that I can redo them after I upgrade.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/joelhaggar" aria-label="Profile: JoelHaggar">@<bdi>JoelHaggar</bdi></a> said:</p>
<blockquote>
<p dir="auto">You'll fine the login file under web/modules/dglux/web</p>
</blockquote>
<p dir="auto">It looks like login.jsp is for the login.htm page (of course) and view.jsp is for the viewer page.<br />
I have edited both files to include my tracking code. It works perfectly!</p>
<p dir="auto"><img src="https://camo.nodebb.org/fe20ac77c1d51fe1f58face0a18e98de2ad7494a?url=http%3A%2F%2Fcl.ly%2Fimage%2F0c3u1T0Y1V1j%2FScreen%2520Shot%25202014-11-16%2520at%252010.54.11%2520am.png" alt="image" class=" img-fluid img-markdown" /></p>
<p dir="auto">We are about to provide some customers with access to Mango and DGLux, so this will be a fantastic way to observe when and how they use Mango.</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/joelhaggar" aria-label="Profile: JoelHaggar">@<bdi>JoelHaggar</bdi></a> said:</p>
<blockquote>
<p dir="auto">Nice idea, this is one of the features we want to add as we upgrade the Mango UI.  For now I think you could add this into the /web/WEB-INF/tags/page.tag file.  I've not tried that so if it doesn't work let us know.  I don't think there is anyway to do that with DGLux.</p>
</blockquote>
<p dir="auto">I think that this will be a very useful feature (and quite easy to implement, I guess?). Note that some tracking (Google Analytics) require the snippet to be pasted before the &lt;/head&gt; tag, and others (Piwik) require it before the &lt;/body&gt; tag.</p>
<p dir="auto">As an aside, I can really recommend Piwik to anyone who is looking for an alternative to Google Analytics. I use both, but Piwik offers a far superior level of detail and is easy to use, self-hosted, and free.</p>
]]></description><link>https://forum.mango-os.com/post/9499</link><guid isPermaLink="true">https://forum.mango-os.com/post/9499</guid><dc:creator><![CDATA[jeremyh]]></dc:creator><pubDate>Sun, 16 Nov 2014 07:43:03 GMT</pubDate></item><item><title><![CDATA[Reply to Insert custom code in page template on Sun, 16 Nov 2014 07:40:28 GMT]]></title><description><![CDATA[<p dir="auto">Excellent.  You can make a copy of the new tag file and put it in overrides/web/WEB-INF/tags/page.tag and this way it won't be overwritten but you run the risk of not getting a needed update file.</p>
<p dir="auto">You should be able to put that on the login page.  You'll fine the login file under web/modules/dglux/web</p>
]]></description><link>https://forum.mango-os.com/post/9498</link><guid isPermaLink="true">https://forum.mango-os.com/post/9498</guid><dc:creator><![CDATA[JoelHaggar]]></dc:creator><pubDate>Sun, 16 Nov 2014 07:40:28 GMT</pubDate></item><item><title><![CDATA[Reply to Insert custom code in page template on Sun, 16 Nov 2014 07:37:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/joelhaggar" aria-label="Profile: JoelHaggar">@<bdi>JoelHaggar</bdi></a> said:</p>
<blockquote>
<p dir="auto">For now I think you could add this into the /web/WEB-INF/tags/page.tag file.</p>
</blockquote>
<p dir="auto">Hi Joel, thanks, that worked. I expect this will get overwritten when I upgrade?</p>
<p dir="auto">I would be happy even if I could just add the tracking code to the /dglux/login.htm page. Do you think that is possible?</p>
<p dir="auto">Cheers</p>
]]></description><link>https://forum.mango-os.com/post/9497</link><guid isPermaLink="true">https://forum.mango-os.com/post/9497</guid><dc:creator><![CDATA[jeremyh]]></dc:creator><pubDate>Sun, 16 Nov 2014 07:37:03 GMT</pubDate></item><item><title><![CDATA[Reply to Insert custom code in page template on Thu, 13 Nov 2014 21:57:05 GMT]]></title><description><![CDATA[<p dir="auto">Nice idea, this is one of the features we want to add as we upgrade the Mango UI.  For now I think you could add this into the /web/WEB-INF/tags/page.tag file.  I've not tried that so if it doesn't work let us know.  I don't think there is anyway to do that with DGLux.</p>
]]></description><link>https://forum.mango-os.com/post/9496</link><guid isPermaLink="true">https://forum.mango-os.com/post/9496</guid><dc:creator><![CDATA[JoelHaggar]]></dc:creator><pubDate>Thu, 13 Nov 2014 21:57:05 GMT</pubDate></item></channel></rss>