In my web site I'm only using client-side scripting (jsrender and jquery) for presenting data. I'm only presenting data from a json-feed, so there have been no need (until now??) for a full scale web-app.
Now I'm trying to integrate Yahoo Web Analytics (YWA). In the search result page, I try to capture the querystring and total hits from the json-feed into the YWA javascripts, but this is quite diffifcult as I'm trying to print client-side jsrender variables into client-side YWA variables:
<script type="text/javascript" src="http://d.yimg.com/mi/eu/ywa.js"></script>
<script type="text/javascript">
/*globals YWA*/
var YWATracker = YWA.getTracker("1000918585199");
var ACTION='INTERNAL_SEARCH';
var _S_ISK={{=querystring}};
var _S_ISR={{=totalHits}};
YWATracker.setCF(01, 'Search-Results');
YWATracker.setCF(04, 'no');
YWATracker.setCF(06, 'KAW');
YWATracker.setDocumentName("Result Page");
YWATracker.setDocumentGroup("KAW");
YWATracker.submit();
</script>
<noscript>
<div><img src="http://s.analytics.yahoo.com/p.pl?a=1000918585199&js=no" width="1" height="1" alt="" /></div>
</noscript>
And this is not working. Any solutions?