This Documentation describes the installation and configuration steps of phpAnalytics.
While the installation process is rather simple, some of the instructions presented here will require minimum understanding in working with databases and managing files on a server.
If you're not familiar with the procedures presented, we do offer installation Services for an additional fee.
2. Requirements
Please ensure that your server meets the following minimum requirements:
On some operating systems, the dotfiles are hidden by default. Before starting to upload the files, please make sure your file explorer has the option to view hidden files turned on.
Upload what's inside the Script folder on the web root folder of your domain. This folder is generally called public_html, html, or example.com, but depending on your server's configuration, it might be named differently.
Configure your web server's document / web root to point to the public directory of the software. For example, if you've uploaded the software in example.com folder, your web directory should be changed to example.com/public folder.
The software requires several cron jobs to be set up in order to automate some of its functions, such as sending out periodic emails, checking the status of the accounts, as well as additional database clean-ups.
Go to Admin Settings Cron job.
Copy the check command and set up a daily cron job for it.
Copy the clean command and set up a daily cron job for it.
Copy the email command and set up a monthly cron job for it.
Most of the software's settings are pretty straight forward and self explanatory, but some of them require more advanced steps to get them working, which are covered in this chapter.
4.1. Payment system
The Payment system relies on Stripe's API and requires an Extended license to be enabled.
From the sidebar, go to the Developers section of the Stripe dashboard and click on API Keys.
Copy the Publishable key and Secret key in Admin Settings Payment.
From the sidebar, go to the Developers section of the Stripe dashboard and click on Webhooks.
Click on Add a new endpoint.
On the Endpoint URL field paste your URL, this can be found on Admin Settings Payment.
On the Version field, select the latest version.
On the Events to send field, click on receive all events, and click the Add endpoint button.
Copy the Signing key in Admin Settings Payment.
You can now copy your keys in Admin Settings Payment.
4.2. Plans
To create new Plans, the Payment system needs to be enabled.
By default, the software comes with a default free plan, which is available to everyone. The default plan cannot be deleted, however the pageviews can be limited.
From the sidebar, go to the Products and then click on Tax rates.
Add a new tax rate.1
When adding a new tax rate, if no Region is specified, the tax rate will apply to everyone. Add a ISO 3166-1 alpha-2 country code to the Region field if you wish to apply taxes per country.