Enrich feedback posts with additional data about the user's session (e.g. current url, app version, device type, etc.)
Written By Bruno from Featurebase
Last updated 6 days ago
You can attach metadata to user feedback to provide additional context about the userβs session (e.g. App version, Device type, etc).
This can be done from the Featurebase web portal and all widgets that support feedback posting.
π¨βπ» You'll need to write custom code for this setup process. If you're uncomfortable with this, share this guide with a technical team member who can assist.
Adding metadata to feedback posts
You can attach metadata to user feedback to provide additional context about the userβs session (e.g. App version, Device type, etc) from all the widgets that support feedback posting.
To set it up, pass a metadata object to the feedback, all-in-one, or the board embed widget.
The data object must be a key-value pair of strings. Here's an example:
metadata: {
"app_version": "1.0.0",
"device_type": "iPhone 12",
"error": "Could not connect to server",
}
Extra: Adding metadata without a widget
When using Featurebase via the web portal url (or as a WebView on a mobile app), you can pass the metadata to the url. It will be attached to the user's session and included when they post feedback.
const metadata = {
"app_version": "1.0.0",
"device_type": "iPhone 12",
"error": "Could not connect to server",
}
// Attach the stringified metadata to the url
const url = 'https://yourboard.featurebase.app?metaData=' + JSON.stringify(metadata)
// Now use this url for linking to your board
Updating metadata on the go
To update metadata ongoingly, you can call the following function when using any of the widgets.
window.postMessage({
target: 'FeaturebaseWidget',
data: {
action: 'updateMetadata',
metadata: {
"app_version": "1.0.1",
"device_type": "iPhone 13",
"error": "Could not connect to server",
}
}
})