Archived topic
closing body tag
1 reply · Started by Adam on October 23, 2022
Hi,
I want to add the tracking code below before the closing </body> tag on your website.Where do i go to locate this?
<!-- Start of Woopra Code -->
<script>
!function(){var t,o,c,e=window,n=document,r=arguments,a="script",i=["call","cancelAction","config","identify","push","track","trackClick","trackForm","update","visit"],s=function(){var t,o=this,c=function(t){o[t]=function(){return o._e.push([t].concat(Array.prototype.slice.call(arguments,0))),o}};for(o._e=[],t=0;t<i.length;t++)c(i[t])};for(e.__woo=e.__woo||{},t=0;t<r.length;t++)e.__woo[r[t]]=e[r[t]]=e[r[t]]||new s;(o=n.createElement(a)).async=1,o.src="https://static.woopra.com/js/w.js",(c=n.getElementsByTagName(a)[0]).parentNode.insertBefore(o,c)}("woopra");
woopra.config({
domain: "realworldinvestor.com",
outgoing_tracking: true,
download_tracking: true,
click_tracking: true
});
woopra.track();
</script>
<!-- End of Woopra Code -->
Hi there,
you can use the wp_footer hook.
Which you can add to using either
a. a hook element
https://docs.generatepress.com/article/hooks-element-overview/
b. Or you can use a PHP snippet:
add_action( 'wp_footer', function(){
?>
Add your script here
<?php
},100);