<!DOCTYPE html>
<html>
 <head>
   <title>Split SDK Quickstart Example</title>
 </head>
 <body>
   <h1>Split SDK Quickstart Example</h1>
   <p>Open the console and input <code>localStorage.splitio_debug = 'on'</code> then refresh to see some logs.</p>    <script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
   <script src="https://cdn.split.io/sdk/split-10.22.4.js"></script>    <script type="text/javascript">
     (function() {
       var factory = splitio({
         core: {
           authorizationKey: 'YOUR_SDK_KEY',
           key: 'CUSTOMER_ID'
         }
       });
       var client = factory.client();        client.on(client.Event.SDK_READY, () => {
         console && console.log('Split SDK is ready to evaluate.');
         var treatment = client.getTreatment('FEATURE_FLAG_NAME');
         console && console.log('Treatment is: ' + treatment);          if (treatment === 'on') {
           console.log("I'm ON");
         } else if (treatment === 'off') {
           console.log("I'm OFF");
         } else {
           console.log("CONTROL was returned, there was an error");
         }          client.destroy().then(function() {
           console && console.log('Split SDK data was successfully flushed.');
         });
       });
     })();
   </script>
 </body>
</html>
<!DOCTYPE html>
<html>

     (function() {
       var factory = splitio({
         core: {
           authorizationKey: 'YOUR_SDK_KEY',
           key: 'CUSTOMER_ID'
         }
       });
       var client = factory.client();        client.on(client.Event.SDK_READY, () => {
         console && console.log('Split SDK is ready to evaluate.');
         var treatment = client.getTreatment('FEATURE_FLAG_NAME');
         console && console.log('Treatment is: ' + treatment);          if (treatment === 'on') {
           console.log("I'm ON");
         } else if (treatment === 'off') {
           console.log("I'm OFF");
         } else {
           console.log("CONTROL was returned, there was an error");
         }          client.destroy().then(function() {
           console && console.log('Split SDK data was successfully flushed.');
         });
       });
     })();
 
by
SPLIT IS NOW PART OF HARNESS

Switch

On

Feature Management

Features that matter

experimentation

Progress

Trusted by engineering leaders

We’ve worked with top organizations worldwide. We help you scale and succeed by being a partner, not just a platform.

We lead the pack in customer ratings on G2

Intelligent Feature Management

Move faster, do more, and gain the confidence that comes with knowing if your changes are making things better or worse.