When recording user sessions with Meticulous, you can add contextual information. This can make the sessions easier to find, and can help your developers debug diffs in these sessions more easily.
Meticulous provides several methods to record different types of context. If you record the same piece of context multiple times, the last value will be used.
You can record the ID and email address of the logged-in user:
// Record the ID of the logged-in user
window.Meticulous?.context.recordUserId('user-123');
// Record the email address of the logged-in user
window.Meticulous?.context.recordUserEmail('user@example.com');
This information is associated with the session and makes it easier to find sessions for specific users.
You can record which feature flags were active during a session (the value should be a string or boolean):
window.Meticulous?.context.recordFeatureFlag('bigUiRefactor', true);
window.Meticulous?.context.recordFeatureFlag('checkoutFlowStyle', 'v3');
You can either record flags one by one as they are used, or loop over all the flags at app initialization.
To learn how Meticulous tests these recorded feature flags, see Testing Feature Flags with Meticulous.
For any other contextual information that doesn't fit into the categories above, you can use the custom context method (again with a string or boolean value):
window.Meticulous?.context.recordCustomContext('userRole', 'admin');
Testing Feature Flags with Meticulous - Learn how Meticulous tests the feature flags you record
TypeScript Types for window.Meticulous - Get type definitions for the
window.MeticulousobjectReach out to eng@meticulous.ai and we'll be happy to help. You can also join our community discord.