I thought a hit counter would be simple enough as it's a pretty basic
piece of code to insert to a html page, however when I add statcounter
to my rails app, all the navigation links break. Can anyone advise me as
to the best way to insert something like this to my app? It works but
when I click on a nav link, it just displays the hit counter on a blank
page unless I reload the page or , if I use the invisible hit counter,
it displays an empty page for whatever nav link I click.
application.html.erb
<!--
* Statcounter to monitor visitors, etc to my webapp
* @reference
https://statcounter.com
-->
<!-- Start of StatCounter Code for Default Guide -->
<script type="text/javascript">
var sc_project=11051099;
var sc_invisible=0;
var sc_security="0e87dbf6";
var scJsHost = (("https:" == document.location.protocol) ?
"
https://secure." : "
http://www.");
document.write("<sc"+"ript type='text/javascript' src='" +
scJsHost+
"
statcounter.com/counter/counter.js'></"+"script>");
</script>
<noscript><div class="statcounter"><a title="shopify
analytics" href="
http://statcounter.com/shopify/"
target="_blank"><img class="statcounter"
src="//
c.statcounter.com/11051099/0/0e87dbf6/0/"
alt="shopify analytics"></a></div></noscript>
<!-- End of StatCounter Code for Default Guide -->
--
Posted via
http://www.ruby-forum.com/.