PHP code example of sylvainjule / matomo

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

    

sylvainjule / matomo example snippets


return array(
    'sylvainjule.matomo.url'        => 'http://your-matomo.url',
    'sylvainjule.matomo.id'         => 'mywebsite',
    'sylvainjule.matomo.token'      => 'token_auth',
);

return array(
    'sylvainjule.matomo.url'            => false, #'sylvainjule.matomo.token'          => false, #jule.matomo.trackUsers'     => false,
    'sylvainjule.matomo.disableCookies' => false,
    'sylvainjule.matomo.blacklist'      => ['127.0.0.1', '::1'],
    'sylvainjule.matomo.basicAuth'      => null,
    'sylvainjule.matomo.area'           => true
    'sylvainjule.matomo.area.label'     => 'Matomo',
    'sylvainjule.matomo.area.headline'  => null,

);

'sylvainjule.matomo.url' => 'https://analytics.yourdomain.com'

'sylvainjule.matomo.id' => 'mywebsite'

'sylvainjule.matomo.token' => 'gQ7TQgg8EFe3h29F9t4aJqC33VQdPfFP4M'

'sylvainjule.matomo.active' => true

'sylvainjule.matomo.blacklist' => ['127.0.0.1', '::1']

'sylvainjule.matomo.trackUsers' => false

'sylvainjule.matomo.debug' => false

'sylvainjule.matomo.disableCookies' => false

'sylvainjule.matomo.basicAuth' => null

'sylvainjule.matomo.area' => true

'sylvainjule.matomo.area.label' => 'Matomo'

'sylvainjule.matomo.area.headline' => 'Custom area headline'

 snippet('matomo'); 

'sylvainjule.matomo.area' => false

'sylvainjule.matomo.area.label' => 'Analytics'
 echo snippet('matomo')