How to Add Tracking Code to Just Before the </body> tag
I would like to add visitor measuring code to my ClassiPress website that I've obtained from Quantcast. (
https://www.quantcast.com)
Quantcast instructions state that the code needs to be placed just before the </body> tag and any other measurement tags. See code below.
<!-- Quantcast Tag -->
<script type="text/javascript">
var _qevents = _qevents || [];
(function() {
var elem = document.createElement('script');
elem.src = (document.location.protocol == "https:" ? "https://secure" : "http://edge") + ".quantserve.com/quant.
js";
elem.async = true;
elem.type = "text/javascript";
var scpt = document.getElementsByTagName('script')[0];
scpt.parentNode.insertBefore(elem, scpt);
})();
_qevents.push({
qacct:"p-8Zxe9uotvM7CT"
});
</script>
<noscript>
<div style="display:none;">
<img src="//pixel.quantserve.com/pixel/p-8Zpe9ncrvJ7CV.gif" border="0" height="1" width="1" alt="Quantcast"/>
</div>
</noscript>
<!-- End Quantcast tag -->
I've been trying to figure out how and where to add the code. As best as I've been able to discern the code is either added to the theme-footer.php file or the Footer file. Also it seems that the code needs to be added as a "hook".
I'm not sure what a "hook" is, how to write a "hook" for this code and where to place the "hook".
Any assistance would be appreciated.
Thank you.