Quickstart

Quickstart

Integrate Impulse and adapt your application to client hardware in three steps.

1. Get Your Free Developer account

  • Request a free Developer account (10,000 sessions/month, no credit card required) from the ScaleDynamics signup (opens in a new tab).
  • You will receive via email info about your account, the Endpoint ID and tailored integration snippet via email.

2. Load the Runtime

Add the Impulse runtime script to your application using your Endpoint ID. For framework-specific setups, Google Tag Manager (GTM), or ES module imports, see the Installation Guides.

Example using HTML Tag:

<script type="module">
  import { SdMetrics } from 'https://cdn.scaledynamics.com/libs/1/sd-metrics.js';
  
  window.sd = new SdMetrics({
    // Replace <PRIVATE_URL> with your private data stream endpoint URL
    endpoint: '<PRIVATE_URL>',
  });
 
</script>

3. Query Metrics & Adapt

Once loaded, Impulse exposes asynchronous getters under window.sd. Query all three metrics in parallel using Promise.all to configure your application at startup without blocking the Main Thread:

async function bootstrapApp() {
  try {
    // 1. Retrieve hardware metric 
    const numThreads= await window.sd.numThreads.get();
 
    // 2. Use it, here set the hardwareConcurrency
    Object.defineProperty(navigator, 'hardwareConcurrency', {
      get: function() {
        return numThreads;
      },
      configurable: true
    });
  } catch (error) {
    console.log('Unable to get Impulse metric');
  }
}
bootstrapApp();

Next Steps

Metrics Reference: Explore detailed thresholds and scoring for threadPerf, devicePerf, and numThreads.

API Reference: View full method signatures, timeouts, and error handling.

Next Steps

Look to our installation guides

Look to our metrics reference

Look to Impulse API