PHP code example of thoughtco / statamic-plausible-analytics

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

    

thoughtco / statamic-plausible-analytics example snippets


[
    'type' => 'plausible_visitor_overview',
    'period' => '30d', // Period you want to show
    'show_graph' => 0 // Boolean, 0 or 1
],

[
    'type' => 'plausible_top_pages',
    'period' => '30d'
]

[
    'type' => 'plausible_top_browsers',
    'period' => '7d'
]

[
    'type' => 'plausible_top_referrers',
    'period' => '7d'
]
bash
php artisan vendor:publish --tag=plausible-config