StatsMix JavaScript Library Beta Release

We’re excited to announce we’ve released into beta a JavaScript library for StatsMix. The new library provides a quick and easy way to track any action or event on a website. Use this to track page views, conversions, downloads, or just about anything else you can think of.

Using our JavaScript library, a metric’s value (along with any metadata) will be sent to StatsMix every time a page loads.

To use it, you’ll just need to follow these steps:

  1. Create a new custom metric in StatsMix
  2. Copy/paste the JavaScript sample code to send a new data point to StatsMix:
  3. <script type="text/javascript">;
        var sm_token = 'METRIC_TOKEN'; // the metric token will be populated for you
        var sm_value = 1; // replace sm_value with any numeric value.
        var sm_meta = '';
        /*
          to add metadata, assign a JSON object to the variable sm_meta:
          var sm_meta = {'food':'ice cream','flavor':'chocolate'};
        */
        var sm_prefix = document.location.protocol == 'https://' ? 'https://' : 'http://';
        document.write(unescape('%3Cscript src="' + sm_prefix + 'http://statsmix.com/stat.js" type="text/javascript"%3E%3C/script%3E'))
    </script>;
  4. Paste this script on any page you wish to track

If you’re interested in using the JavaScript library during beta, please contact us. If you don’t already have a StatsMix account, you can sign up for one here.

by Tom Markiewicz on March 12, 2012 · 0 comments
tagged as , , in API,Beta,Developers

Previous post:

Next post: