-
ContextI want to add the feedback widget to my documentation website. I do not want to use Google Analytics. I can't find a way to use DescriptionSee above. If I set "provider: google" I get a feedback widget. If I set "provider: custom" it disappears. I can't make it appear when I set "custom". When I set it to google I get unwanted Google Analytics code that I can't get rid of. I can hack something together but I don't want to. Related linksUse CasesSeems obvious from the context, thanks. VisualsYAML extra:
analytics:
provider: google
property: custom_property
feedback:
title: Was this page helpful?
ratings:
- icon: material/emoticon-happy-outline
name: This page was helpful
data: 1
note: >-
Thanks for your feedback!
- icon: material/emoticon-sad-outline
name: This page could be improved
data: 0
note: >-
Thanks for your feedback! Help us improve this page by
using our <a href="..." target="_blank" rel="noopener">feedback form</a>. Changing I can handle the events just fine. I need the form to be visible. Before submitting
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 12 replies
-
Thanks for suggesting. It can definitely be customized to not use Google Analytics, since the feedback widget as such does not include any reference to Google. I'm converting this to a discussion, so others can help you |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Yes, the feedback form is invisible by default. Why? Because JavaScript might not be available, so it is only enabled when the Google provider script, or a custom script shows it. Without JavaScript, the feedback form makes no sense, because we need JavaScript to send the selected rating. It is unhidden here:
mkdocs-material/src/templates/partials/integrations/analytics/google.html
Lines 75 to 76 in 9b98c77
You just need to write a custom provider by copying the Google Provider and throwing everything out that is Google, adding your own custom logic for where you want to store ratings. Our documentation should help here.