PHP code example of chappy84 / google-analytics-server-side
1. Go to this page and download the library: Download chappy84/google-analytics-server-side 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/ */
chappy84 / google-analytics-server-side example snippets
$gass = new \Gass\GoogleAnalyticsServerSide;
$gass->setAccount('UA-XXXXXXX-X')
->trackPageView();
$gass = new \Gass\GoogleAnalyticsServerSide;
$gass->setAccount('UA-XXXXXXX-X')
->setBotInfo(true);