You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Feedback is a Javascript analytics tool that provides feedback on how visitors are interactiving with your website. It sends data from the visitor's browser to a server that you choose (like your own server). It's inspired by Basecamp's Beanstalk analytics, and the objective is to keep user data in-house and off of 3rd-party analytics servers. This was primarily a Javascript and analytics learning exercise.
Overview
To test the setup, visithttp://localhost:8080 in your browser. We're running Nginx on port 8080 on localhost (the development laptop).
Nginx servesindex.html (as well asfeedback.js andexamples.js) from the default Nginx root directory,/usr/local/var/www. (Copy these 3 files to this directory.) Notice thatindex.html includes bothfeedback.js andexamples.js, which provide the analytics functionality.
When you visitindex.html,feedback.js records presence, page views, and other analytics data that you specify (seeexamples.js) and sends that information to a separate server (climatemojo.com, in this example).
The climatemojo.com domain name points to a DigitalOcean server that's running a simple Express HTTP server (express.js in this repository). The DigitalOcean Ubuntu server is built using Terraform and the DigitalOcean API. See the Infrastructure repository for details. The Express server simply logs the data it receives to show thatfeedback.js is working as expected.
Note: The steps below aren't 100% complete, but~/projects/node is a basic node/express project, with the addition ofexpress.js andclimate.png from this repository.
Test the Express server on localhost before copying to DigitalOcean
cd ~/projects/nodenode express.jsin Chrome, visit: http://localhost/climate.png?site=location
Copy the Express server from localhost to DigitalOcean
cd ~/projects/nodersync -az -e ssh ./* mojo:/home/yut/node
Run Express server on DigitalOcean
cd /home/yut/nodeDEBUG=express:* node express.js
About
A javascript analytics tool to send visitor data to a server you choose.