PHP code example of floriankarsten / kirby-plausible

1. Go to this page and download the library: Download floriankarsten/kirby-plausible 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/ */

    

floriankarsten / kirby-plausible example snippets


    // config/config.php
    'floriankarsten.plausible' => [
        // Required
        'scriptUrl' => 'https://plausible.io/js/XYZ.js', // replace with the URL of the Plausible site you want to use

        // Required
        'sharedLink' => 'https://plausible.io/share/yourwebsiteurl.com?auth=Jz0mCWTPu5opXi0sAgRrq',

        // Optional: To proxy Plausible through your own server (helps avoid ad blockers)
        // 'proxy' => [
            // 'enabled' => true,
            // 'cache' => 60 * 24, // 24 hours, optional
            // 'plausibleEndpoint' => 'https://plausible.io', // customize the Plausible instance when self-hosting, optional
        // ]
    ];
    

     snippet('plausible');