Skip to content

austinarchibald/blocmetrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blocmetrics

An analytics service and reporting tool that you can use with web apps to track user activity and report results.

  1. Create an account at Blocmetrics and add your website url you want to track.

Now, suppose we wanted to track page visits.

  1. Add the following code to your site (either a new .js file or in <script> tags:
var blocmetrics = function(page_views) {
	var _bm_event = {
	event_name: page_views,
	}

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

$(document).ready(function(){
    blocmetrics(window.location.pathname);
  })
  1. Visit your Blocmetrics Application page to see the live results!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published