This was a quick experiment in prototyping a simple website feedback form ("How was your experience? [Good / Bad]"). See this repository's issues for some discussion of this idea and a few examples of feedback widgets on government websites (including issues #2 and #6). We're not planning to continue working on this particular prototype, but you're welcome to learn from what we've posted!
To add to your site, add the following to your <head>
:
<script src="https://github.com/18F/feedback-widget/raw/master/widget.js"></script>
<script>
new FeedbackWidget(url);
</script>
You can optionally pass in a target element where you want the widget to be added:
var element = document.getElementById('...'); // or whatever
new FeedbackWidget.init(url, element);
This repository also includes an API for collecting the data.
Run:
pip install -r requirements.txt
python app.py
widget.js
.Run:
npm run build
The new build will be placed in widget.dist.js
. Open index.html
in your browser to test it.