PHP code example of schnti / plausible

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

    

schnti / plausible example snippets


'schnti.plausible' => [
  // Required: Shared link for the Panel iframe view
  'sharedLink' => 'https://stats.example.com/share/example.com?auth=XXXXXXXX',

  // Required: Plausible tracking script (signed pa-*.js)
  // This can be plausible.io or a self‑hosted instance
  'script' => 'https://stats.example.com/js/pa-XXXXXXXX.js',
],

 snippet('plausible');