Google Analytics is a service that tracks and reports your website traffic.
You can start by creating a Google Analytics account here. During the Google Analytics setup process, you will be provided a tracking code. Copy the tracking code that Google gives you. The tracking code starts with <script> and ends with </script>.
Your tracking code should look like this:
<!-- Global Site Tag (gtag.js) - Google Analytics -->
<script async src=“https://www.googletagmanager.com/gtag/js?id=UA-XXXXXX-1“></script>
window.dataLayer = window.dataLayer || ;
gtag(‘js’, new Date());
Click on Cogwheel > Settings > Statistics and paste the tracking code. Click on Save. Your statistics should start displaying in your Google Analytics account within 24 hours.
If you get the message tracking code is missing in your Google Analytics account: The error message "tracking code is missing" shows up if your website or any of your templates are password protected or is unpublished. Your Google Analytics service is still working but the message will appear from time to time, you can just ignore it.
If your Google Analytics is not working after adding your tracking code to your Portfoliobox website, please check if you have verified your site ownership by adding the meta tag provided by Google. For more information about site ownership verification, you can refer to this solution article.