Skip to content

Instantly share code, notes, and snippets.

@GrooveStomp
Created March 7, 2013 20:52
Show Gist options
  • Select an option

  • Save GrooveStomp/5111688 to your computer and use it in GitHub Desktop.

Select an option

Save GrooveStomp/5111688 to your computer and use it in GitHub Desktop.
Javascript sample for using the API to grab some page stats info.
var page_id = "6c95858a-85fc-11e2-82b1-12313e0080a1";
$(document).ready(function() {
var url = "https://secret-island-6724.herokuapp.com/page-stats-jsonp/" + page_id;
$.ajax({
"url": url,
"dataType": "jsonp",
"jsonp": "jsonp"
})
.done(function(data) { console.debug(data); })
.fail(function(data) { console.debug(data); })
;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment