You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Awesome tool you have here! I want to add feedback.js to a webpage where a user is already logged in. In the webpage I have a javascript variable that contains the user's email. I would like feedback.js to automatically include the user's username in the payload when feedback.js is used by the user (as opposed to the customer typing in their email again).
Is there any way to do that? I was considering using the "id" field, but I couldn't figure out how to programmatically set the field on page load.
More generally, I love how easy it is to plug in feedback.js into a website with a simple one-line insertion. However, I am not as savvy on how to use the more advanced techniques called out on your website.
However, it would be good to see a full example of this. I am uncertain how to use "import Feedback from..." within a <script> tag on a web page.
Another example from your website, it says:
You can customize feedback-js by passing a options object to new Feedback() or use the data-feedback-opts attribute.
const options = {
id: 'feedback', // id to identify the form on the backend
endpoint: 'https://example.com/feedback', // enpoint of your backend to handle the submission
emailField: true, // show email input field, default: false
...
color: '#000' // font color
}
const feedback = new Feedback(options)
feedback.renderButton()
However, not knowing the context of this made it a bit difficult to implement (likely because I am not an expert at JS). I believe I got something like "Feedback was not declared".
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Awesome tool you have here! I want to add feedback.js to a webpage where a user is already logged in. In the webpage I have a javascript variable that contains the user's email. I would like feedback.js to automatically include the user's username in the payload when feedback.js is used by the user (as opposed to the customer typing in their email again).
Is there any way to do that? I was considering using the "id" field, but I couldn't figure out how to programmatically set the field on page load.
More generally, I love how easy it is to plug in feedback.js into a website with a simple one-line insertion. However, I am not as savvy on how to use the more advanced techniques called out on your website.
For example, from your website you say:
You can also set it up manually with JavaScript:
However, it would be good to see a full example of this. I am uncertain how to use "import Feedback from..." within a <script> tag on a web page.
Another example from your website, it says:
You can customize feedback-js by passing a options object to new Feedback() or use the data-feedback-opts attribute.
However, not knowing the context of this made it a bit difficult to implement (likely because I am not an expert at JS). I believe I got something like "Feedback was not declared".
Thank you for making this tool!
Beta Was this translation helpful? Give feedback.
All reactions