/Metrix

Web analytics app buillt using Ruby on Rails

Primary LanguageRuby

README

INSTRUCTIONS FOR TRACKING AN APP

  1. After creating an account on the Blocmetrics site, Log In

  2. On the dropdown menu on the navigation bar, click on ‘Add App’

  3. Enter a name and url for the web application you wish to track (you can enter any name you like) and click ‘save’

  4. Once the app is registered, copy the following snippet and place it in the ‘application.html’ file on the site, before the </head> tag:

<script>

(function (){
  var _bm_event = {
    name: "Event name"
  }

  var _bm_request = new XMLHttpRequest();
  _bm_request.open("POST", "http://localhost:3000/api/events", true);
  _bm_request.setRequestHeader('Content-Type', 'application/json');
  _bm_request.onreadystatechange = function() {
  };
  _bm_request.send(JSON.stringify(_bm_event));
}());

</script>