How to add web analytics to a website or web application
For the tracking to work, you will need to embed the Wide Angle Analytics tracking code on your site. The approach might differ depending on your framework, language of choice or CMS. We provide an extensive list of integrations and guides for some of the most popular publishing platforms on the market.
If you use another solution, or if your website is a custom implementation, this guide will show you how to implement tracking on it.
Enable Tracker Script
In the Site configuration screen in the Wide Angle Analytics Dashboard, you can find a ready-made code snippet. Simply copy & paste it to the website source code or site generation engine.
The resulting code of your site should look similar too:
<html>
<head>
<!-- HEAD section -->
</head>
<body>
<!-- BODY section -->
<script async defer src="https://stats.wideangle.co/script/UNIQUE_ID.js">
</script>
</body>
</html>
Optionally Prefetch Script
You can potentially improve performance of the tracking script loading, by adding special hints, you will inform capable browsers, such as Chrome, Firefox and Safari, to download the tracking script as soon as possible. This can improve overall site loading time even further.
To do so, add link
element to &lt;head&gt;
section of your website:
<head>
<link rel="prefetch" href="https://stats.wideangle.co/script/UNIQUE_ID.js"/>
</head>
Make sure your site is active and that the custom domain, if you use one, is verified.
That's it 🎉
Still need help? In that case please contact our support via, email or chat.