API

Quickstart

// Step 1. Initialize API window.UserMetrics = new UserMetrics({ host: um_host || "", apikey: um_apikey }); // Step 2. Edit the tag and (optional)funnel id. UserMetrics.setTag("myApp"); UserMetrics.setFunnel({ funnelid: 'funnel1', page: 1); // Step 3. The default metric is automatically triggered when loaded. // Add extra metics: UserMetrics.metric("Perfcheck", 55.1, { route: window.location.pathname });