Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browserscope reporting #52

Open
paulirish opened this issue Oct 24, 2010 · 0 comments
Open

Browserscope reporting #52

paulirish opened this issue Oct 24, 2010 · 0 comments
Labels

Comments

@paulirish
Copy link
Collaborator

Got some detail from Lindsey on using grouping to send all the results in a single beacon and display it nicely.. this should work well for us

Hey Paul,

The basic idea I was thinking of was that your JS page which does the browserscope beacon could do:

['test_a=foo', 'test_b=foob', 'test_c=fooc', 'group_1': foog]

Now in your results table you'd add &f=group_1,group_2,group_3 to the URLs and the results tables would then only show the medians of the group values.
That way you can store all the granular data but only display the median of the grouped results (which is good enough for most things).

Let me know if I can help with the has.js integration in any way!
-l

Just for kicks.. here's the code for dynamic test creation. though i'm not sure we need it

/*
  dynamic browserscope test creation.

  get an API key from creating an account on browserscope
  http://groups.google.com/group/browserscope/browse_thread/thread/14cb53b2a589420a#

  example code from mathias below.  

*/
<?php>

function addBrowserscopeTest($title = '', $description = '', $url = '') {
 $bURL = 'http://www.browserscope.org/user/tests/create?api_key=' . BROWSERSCOPE_API_KEY . '&name=' . urlencode($title) . '&description=' . urlencode(substr($description, 0, 60)) . '&url=' . urlencode($url);
 if ($json = file_get_contents($bURL)) {
  // $http_response_header is a magic variable containing the resulting headers of file_get_contents()
  // var_dump($http_response_header);
  $json = json_decode($json);
  return $json->test_key;
 } else {
  return '';
 }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant