Browserscope wants to help you store and aggregate your browser test data. Storing your data in our system gives you the benefit of not having to write a complex, scaling backend with a user agent parser built in. You can download all of your data for offline processing, and we provide a stats table widget that you can embed on your page which shows the median results for your tests.
This is definitely a release early/often feature, and we want to be explicit that things may change or break in the API while we're in alpha mode.
<script>
// To save data in Browserscope do something like the following.
// The syntax is 'test_key': 'value' where test_key is some unique
// identifier for a piece of data you want to store (no = or , allowed)
// and value is a numeric value from 0 through .
// Note: You can only send a maximum of results in a beacon.
var _bTestResults = {
'test_one': 1,
'test_two': 0
};
// Beacon the results to Browserscope.
(function(document) {
var testKey = 'CHANGE-THIS-TO-YOUR-TEST-KEY';
var newScript = document.createElement('script'),
firstScript = document.getElementsByTagName('script')[0];
newScript.src = 'https://www.browserscope.org/user/beacon/' + testKey;
firstScript.parentNode.insertBefore(newScript, firstScript);
}(document));
</script>
newScript.src += '?callback=YOUR-FUNCTION-NAME';
newScript.src += '?sandboxid=YOUR-SANDBOX-ID';
Just remember not to publish this widely and/or change it after
you're done testing so that no one can corrupt your dataset.
newScript.src += '?test_results_var=YOUR-VAR-NAME';
<script
src="https://www.browserscope.org/user/tests/table/YOUR-TEST-ID?o=js"></script>
Parameters:
v=top: Shows the "Top Browsers" list. (DEFAULT)
v=top-d: Shows the "Top Desktop Browsers" list.
v=top-d-e: Shows the "Top Desktop Edge Browsers" list.
v=top-m: Shows the "Top Mobile Browsers" list.
v=0: Shows the browser families.
v=1: Shows the major browser versions.
v=2: Shows the minor browser versions.
v=3: Shows all browser versions.
o=html: The browserscope HTML table (DEFAULT, good for iframe src)
o=js: Good as a script src value, renders the results table in your page.
o=json: A JSON encoded response with the tabular median data.
w=#: Sets the width of the results table (in px).
h=#: Sets the height of the results table (in px).
f=test_key_1,test_key_2: Limit result columns to only these test_keys.
highlight=1: Colors your cells green to red based on detected min/max values.
callback=yourFnName: When o=json, wraps json output in "yourFnName()".
When o=js or o=html it will pass a param which is a class on which
you can call 1 method named "load" to refresh the resultstable.
For instance, if you had &callback=myCallback:
var myBrowserscopeTable;
var myCallback = function(browserscopeTable) {
myBrowserscopeTable = browserscopeTable;
}
var reloadTable = function() {
myBrowserscopeTable(); // would refresh the data table.
}
/user/tests/create?api_key=YOUR-API-KEY&name=Some test name&description=A longer description&url=https://yourtest.example.com/page.html
{"test_key": "thetestkeyforthenewtest"}
Please send any feedback and ideas about these features to the Google Group