PHP code example of betacie / ganalytics-bundle

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

    

betacie / ganalytics-bundle example snippets


// You could use tracker service in a controller or inject him in other services
// like a registration listener
$this->container->get('betacie_google.event_tracker')->trackEvent([
    'category' => 'Registration',
    'action' => 'Confirmed',
    'label' => 'user-1',
]);