Giter Site home page Giter Site logo

blocmetrics's Introduction

Blocmetrics

Blocmetrics is an analytics service to track events on websites.

Key features:

  • A server-side API that captures and saves events to a database built with Rails 5.1.5
  • A client-side JavaScript snippet that allows users to track events on their website
  • A web accessible rails application that displays the captured event data for a user
  • Graphs of event data displayed using Chartkick and Groupdate download option

Installation

Setup and configuration

To configure your application for tracking with Blocmetrics, add the following JavaScript Snippet to your application, e.g. to app/assets/javascripts/application.js for a Rails application:

var blocmetrics = {};

blocmetrics.report = function(eventName){

  var event = { event: { name: eventName }};
  var request = new XMLHttpRequest();
  request.open("POST", "https://stark-forest-69447.herokuapp.com/api/events", true);
  request.setRequestHeader('Content-Type', 'application/json');
  request.send(JSON.stringify(event));
};

Usage: Add this snippet blocmetrics.report('eventName') to the relevant views, customizing for the event you wish to track.

window.onload = function() {
  blocmetrics.report('eventName');
}
  • Push your changes to GitHub
  • Push your changes to your production environment (if relevant)

Languages and frameworks

  • Ruby 2.5.0
  • Ruby-on-Rails 5.1.5

Databases

  • SQLite (Test, Development)
  • PostgreSQL(production)

blocmetrics's People

Contributors

cheneyshreve avatar

Watchers

James Cloos avatar Cheney S avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.