Add javascript tracker and give Blocmetrics the capability to receive and record events from the js tracker.

old code, added latest from bloccit

On Jul 24, 2014, at 4:26 AM, Oliver Azevedo Barnes <notifications@github.com> wrote:

> In app/assets/javascripts/js_webstub.js:
> 
> > +  if(!clientIP) {
> > +    var script = document.createElement( "script" );
> > +    script.type = "text/javascript";
> > +    script.src = "http://ip-api.com/json/?callback=getIP";
> > +    document.head.appendChild(script);
> > +  }
> > +else {
> > +  getIP();
> > +}
> > +}
> > +
> > +function getIP(data) {
> > +  if(data) clientIP = data.query;
> > +
> > +  var bm_event = {
> > +    name: "Test",
> where's app_id?
> 
> —
> Reply to this email directly or view it on GitHub.
>