08 - Google Analytics

November 26, 2021

WARNING: This post is over a year old. Some of the information this contains may be outdated.

Register the website on Google Analytics.

Get your tracking ID, go to config.php and add your ID under the services key.

<?php

return [
    // ...
    'services' => [
        'analytics' => 'UA-XXXXX-Y',
    ],
    // ...
];

You can set your tracking ID to an empty string if you want to disable analytics without completely removing the related code.

'analytics' => '',

The master template is designed to only include analytics in production. This is to avoid tracking page views while you are developing the site.


Para comentar acesse a sessão abaixo.