Example: Common events - evolv-ai/metrics GitHub Wiki

Page load events

{
  "source": "expression",
  "key": "window.location.pathname",
  "action": "event",
  "apply": [
    {
       "when": "/product",
       "tag": "pageload.product"
    },
    {
       "when": "/cart",
       "tag": "pageload.cart"
    }
  ]
}

CTA click events

{
  "source": "dom",
  "on": "click",
  "action": "event",
  "apply": [
    {
       "key": "button.add-to-cart",
       "tag": "click.cta.add-to-cart"
    },
    {
       "key": "button.checkout",
       "tag": "click.cta.checkout"
    }
  ]
}