Configuration
All configuration is optional—the system works out of the box without any setup.
Custom HTML attributes
We support the following custom attributes:
data-do-obfs
data-dont-obfs
data-do-obfs
While our automatic obfuscation handles most sensitive data effectively, this attribute forces maximum obfuscation on an element.
Example:
In some cases, your sensitive data may not conform to recognizable patterns, only be sensitive to you and/or only be sensitive when combined.
Consider:
<div>
<p>company name</p>
<p>our customer company id</p>
</div>
if these p
tags do include sensitive data which fail the meet the above requirements.
You could add:
<div data-do-obfs>
<p>company name</p>
<p>our customer company id</p>
</div>
You can always configure the system-wide obfuscation level.
Events are always obfuscated on the client first before being sent to our servers.
Obfuscated elements cannot be deobfuscated, the result of the obfuscation example above would look something like this:
<div>
<p>Obfuscated text</p>
<p>Obfuscated text</p>
</div>
We might obfuscate your data further before saving it to our databases.
data-dont-obfs
This attribute ensures the element it is applied to is never obfuscated.
Metadata
You can attach custom metadata to sessions, making it easy to search for sessions based on identifiers like email addresses.
Example:
window.byteboost.setSessionMetaData({
email: '[email protected]',
});
Metadata is stored in the browser and synced whenever a session triggers a painpoint.
If the metadata object changes, the new data will replace the old, and the updated metadata will be synced.
Note: Metadata has a maximum size of 1024 bytes.
Type Definition
type SetSessionMetaData = (
metadata: Record<string, string | number | boolean>,
) => void;
Usage
If you're using a framework like React, you might consider implementing this in a useEffect
hook to ensure metadata is only synced when it changes.
While this is a recommended practice, it’s not strictly required.
If setSessionMetaData
is called on every render, no additional requests will be sent unless the data actually changes.