⚠️ We do not recommend to use this in production yet as many things are subject to change.
Welcome to Heatmap, the open-source software for your heatmapping needs 🖥
- Click tracking
- Movement tracking
- PHP >= 8.1
- Database (MySQL, PostgreSQL)
- Ability to configure x-frame options in your website
First set up a database, and remember the credentials.
git clone https://github.com/ploi-deploy/heatmap.git
composer install
php -r "file_exists('.env') || copy('.env.example', '.env');"
php artisan key:generate
Now edit your .env
file and set up the database credentials, including the app name you want.
php artisan heatmap:install
And login with the credentials you've provided, the user you've created will automatically be admin.
To manage your servers and sites, we recommend using Ploi.io to speed up things, obviously you're free to choose however you'd like to deploy this piece of software 💙
That being said, here's an deployment script example:
cd /home/ploi/example.com
git pull origin main
composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev
echo "" | sudo -S service php8.1-fpm reload
php artisan route:cache
php artisan view:clear
php artisan migrate --force
npm ci
npm run production
echo "🚀 Application deployed!"
Alternatively you can also use the upgrade command to clean up your deployment script:
cd /home/ploi/example.com
git pull origin main
composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev
echo "" | sudo -S service php8.1-fpm reload
php artisan heatmap:upgrade
npm ci
npm run production
echo "🚀 Application deployed!"
If you're using queue workers (which we recommend to do) also add php artisan queue:restart
to your deployment script.
Chances are, when you're setting up the heatmap software and trying to display the heatmap you'll encounter an error like:
Refused to display 'https://yourwebsite.com' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
This means, it won't allow external iframes to load in your website. Luckily, this is easily solvable.
If you have this line in your NGINX host configuration, either remove it, or put it in comments:
add_header X-Frame-Options "SAMEORIGIN";
to (or remove)
#add_header X-Frame-Options "SAMEORIGIN";
Next add this piece of code inside the server{}
block:
add_header Content-Security-Policy "frame-ancestors 'self' https://your-heatmap-address.com";
Obviously, replace your-heatmap-address.com with the actual domain where your heatmap is hosted.
TODO
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
We appreciate sponsors, we still maintain this repository, server, emails and domain. You can do that here. Each sponsor gets listed on in this readme.
The MIT License (MIT). Please see License File for more information.