StrictOrderConstraint Function

Produce a point only if the specified events and only they are triggered in the order specified. Should any unlisted event be triggered during the sequence, it is reset.

This constraint could be useful to locate work-arounds made by users to achieve some function. Consider for example that we have a product listing page which we've recently improved to allow users to deactivate products right from that page instead of going to their detail pages and deactivating them one by one.

One way to capture the previous behavior could be to check whether the user is visiting the product page only to deactivate it then to leave within 5 seconds of each interaction.

The metric below represents that:

import { StrictOrderConstraint } from 'full-metal-alchemy'

{
  name: 'Visited product page to delete product',
  constraints: [
    StrictOrderConstraint([
      'page-visit/product',
      'product-deactivated',
      'page-leave/product'
    ])
  ]
}

Signature

StrictOrderConstraint(events: Array.<String>) -> Constraint