Route Hashing Method

The Route Hashing method determines User Context and saves it as a route hash.

Requirements

  1. This method works only on pages that follow a blob pattern, i.e. products/:slug, and use getStaticProps (i.e., PDP pages).

  2. getStaticPaths must return fallback: 'blocking' . This is required to build page new Test Group combinations live.

Considerations

Pros

  1. Speed. Pages using the method will be cached internally by Next.js. For example, two users in the same Test Group will be redirected directly to the cached page.

Cons

  1. The number of cached pages will grow exponentially based on the number of active Tests and Test Groups per test, per route. For example, a site with 3 Experiments with 3 Test Groups each will have 27 possible Test Group permutations per route.

  2. Additional hosting costs due to additional page builds and caching may occur. Verify build and hosting limits with your hosting provider.