ParaMetric Rails App
An analytics service for tracking & visualizing events for users websites linked to the service.
Thu Mar 01 2018
Created With:
- Rails 5.1.5
- Sass-Rails 5
- Devise
- Slim
- Chartkick
Getting Started
-
Download or clone the repo.
git clome git@github.com:perspicacious-one/parametrics.git
-
navigate to the directory
cd parametrics
-
Run the database migrations
rails db:migrate
-
(Optional) Seed the database
rails db:seed
-
Run
rails s
Snippets
AJAX Request Snippet
var parametrics = {};
parametrics.report = function(eventName){
var event = {event: { name: eventName }};
var request = new XMLHttpRequest();
request.open("POST", "http://localhost:3000/api/events", true);
request.setRequestHeader('Content-Type', 'application/json');
request.send(JSON.stringify(event));
};