Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
// File: your-code.js
const { Gumband } = require('@deeplocal/gumband-nodejs-sdk')
// or import { Gumband } from '@deeplocal/gumband-nodejs-sdk'

const gb = new Gumband(EXHIBIT_TOKEN, EXHIBIT_ID, PATH_TO_MANIFEST);

function exhibitWokenFromIdleState() {
  let interactionId = gb.metrics.createConcurrent('Exhibit Woken', {});
  
  console.log(interactionId);
  // 0357892a-68e0-49cc-bf2d-18a8ca563f68
}

You will need to keep track of this interactionId while the interaction is ongoing. To add more more events to the same interaction, add the returned interactionId on subsequent event calls:

...