PHP code example of stenvdb / craft-umami

1. Go to this page and download the library: Download stenvdb/craft-umami library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

stenvdb / craft-umami example snippets




return array(
    '*' => array(
        // The domain name where Umami is hosted. This is also the URL where the tracker code is pointed to.
        'baseUri' => '$UMAMI_BASE_URI',

        // The website ID of this site. You can find the ID in your tracking code snippet.
        'websiteId' => '$UMAMI_WEBSITE_ID',

        // You can also use multi-site config values, e.g.
        // 'websiteId' => [
        //     'default' => '$UMAMI_WEBSITE_ID',
        //     '<...>' => '<...>'
        // ]

        'username' => '$UMAMI_USERNAME',

        'password' => '$UMAMI_PASSWORD',

        // Automatically inject a tracking script in your site
        'injectTracking' => false,
    ),
    'production' => [
        'injectTracking' => true,
    ],
);