• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// This is an example config to be used with the --probe-config switch.
2{
3  probes: {
4    js: {
5      # You can use "setup" to run some code before any story and set up
6      # some tracking or patch existing JS functions.
7      # setup: "globalThis.customMetrics = { };"
8
9      # This js code should return a simple JS object where the keys are the
10      # metric names and the values are numbers. The data is then automatially
11      # merged over multiple iterations by the probe.
12      js: 'return { "elements":  document.getElementsByTagName("*").length };'
13    },
14  }
15}
16