@webbio/strapi-plugin-userback
v1.0.1
Published
Plugin that enables Userback
Downloads
263
Maintainers
Keywords
Readme
Strapi plugin Userback
This Strapi plugin enables Userback feedback widget on your Strapi admin panel.
UserBack token
NOTE: If the project based token does not work -> construct the UserBack token from the Account ID, the Project ID and the Global Access Token (without the A-
part).
# account_id|project_id|global_access_token_without_A_dash
USERBACK_TOKEN='12345|12345|123ABC0ABC12345ABCDEF12AB'
You can find the the
account_id
andproject_id
by inspecting the project page with the DevTools. Look for the response from thehttps://app.userback.io/NLI/dashboard/?_xhr=app_getData
call in the "Network" tab. Use the cmd/ctrl+f search tool and search for the project name.
Plugin Config
To enable this plugin. Add it to plugins.ts
userback: {
enabled: true,
config: PluginConfig
}
// alternative
userback: {
enabled: true,
config: {
token: env("USERBACK_TOKEN"),
},
},
Config type:
type PluginConfig = {
token?: string; // Secret token for the plugin
};
Important
- To make the script work correctly, make sure you add the
'https://api.userback.io'
and'https://static.userback.io'
script-src directives to your middlewaresstrapi::security
config. Example:
export default ({ env }) => [
// ...
{
name: 'strapi::security',
config: {
contentSecurityPolicy: {
// ...
directives: {
// ...
'script-src': [
// ...
'https://api.userback.io', 'https://static.userback.io'
// ...
],
// ...
upgradeInsecureRequests: null
}
}
}
}
// ...
];