Skip to main content

Score decay

The classification process depends on scores that are increased and decreased as a visitor engages with a website or other digital experience. While those scores are accurate at the time they are calcualted, over time, they become less accurate.

Uniform compensates for that by automatically reducing stale scores over time. This is described as "decay". By default, Uniform does not decay scores, but this functionality can be activated in your front-end application.

Activate linear decay

Uniform provides decay function that reduces a score by the same amount every time it runs. The following example demonstrates how to activate linear decay.

import { 
Context,
createLinearDecay,
} from '@uniformdev/context';

const manifest = { project: {} };
const options = { decayRate: 0.1 };

const context = new Context({
manifest,
consent: true,
decay: createLinearDecay(options),
});
info

For more information on linear decay, see the package reference.

Implement custom decay

info

Coming soon.