Source code for www.therealhotdogmark.com
The code in index.php is based on this "PHP quickstart" guide for Google Analytics Reporting API v4.
This website uses the Google Analytics API to track the number of unique visitors. This required me to create a Google Clound Platform project with an associated service account. I then had to add the service account to my Google Analytics account.
Important: For security reasons, the service account credentials have not been committed to source control. Before deploying these files to a web server, you'll need to paste the service account credentials into the service-account-credentials.json file, then upload this file into a folder above the web root.
- Follow these instructions to install Composer locally, into the project's root directory.
- Run
mv composer.phar composerto rename the Composer file. - Run
php composer installto install the project's dependencies. - Run
php -vand make sure that you have PHP version 7.2.5 or higher installed. The web server that you deploy these files to will also need to be running this version of PHP or higher. - Run
php -S localhost:9000to start a local PHP development server.
- Run
php composer outdatedto check for available updates. - Run
php composer updateto update the dependencies.