Attaching features
Meaning
Features are essentially groupings of functions. It is designed to make it easier to track functions that are on the same page, or that are logically similar.
Attaching features
Lamione provides the ability to attach functions to features from code when calling the logger.
If feature is missing, it will be automatically created. Also, if the function is not attached to the feature, they will be linked.
In this example, after calling logEvent
, "Login Button Click" function and "Authorization" feature will be created.
const { logEvent } = useBrowserLamion({ ... });
logEvent("Login button click", "Authorization");
Using features with loggers
const { useLogger } = useBrowserLamion({ ... });
const buttonLogger = useLogger("Login button click", "Authorization");
buttonLogger.log();