Error when adding Google Analytics code to affiliate panel.

Post Affiliate Pro uses Smarty template engine so some text needs special care before it can be used. Namely { and } as Smarty uses them to parse the text.
Unfortunately most JavaScript Code also uses curly brackets and can throw error when you simply place JavaScript into Smarty template. Fortunately this can be easily fixed by placing the code between {literal}{/literal} tags, like this:

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "https://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "' type='text/javascript'%3E%3C/script%3E"));

<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-xxxxxx-x");
} catch(err) {}

NOTE: JavaScript code will be executed only if it is placed into a .stpl file due to security reasons.