General instructions for CUX code installation
Introduction
CUX code is necessary to connect your site and CUX. The code makes sure the CUX database is always up to date and has the relevant pieces of information about visits, clicks, and visitor data. This is the only way to connect your site and CUX. When CUX script is operational on your site, and there’s traffic, you can safely assume that all the information you need is available on your CUX dashboard.
Before you start
- Consider CUX installation using Google Tag Manager. That’s the least time-consuming approach. For more information, see Install CUX code with Google Tag Manager.
- Make sure you can log in to your site using the administrative account.
The CUX code can be installed anywhere on the page. The recommended location for the script installation is before the closing BODY tag. This is just a recommendation. If you can’t do this, you can install the code, for example, before the closing HEAD tag.
<div class="footer-copyright">
<div class="container"> made with ♥️in Berlin | © cux.io 2019</span></div>
</div>
</footer>
<script>(function(c,u,x,i,o){
c._cuxSettings=c._cuxSettings||{id:o};
var e=u.createElement(x),t=u.getElementsByTagName(x)[0];
e.src=i;e.async=true;e.defer=true;t.parentNode.insertBefore(e,t);
c._cux_q=[];c._cux=c._cux||{send:function(n,p){c._cux_q.push({n:n,p:p,t:new Date()})}};
})(window, document, "script", "//dc.cux.io/analyzer.js?", "2056434044.0.70977600.1495720240.5926e130ad4cf");</script>
</body>
</html>
You can install the code anywhere on the page. It’s best to add the code before the