LogSnag Docs
Home
  • ⚡Welcome
  • Quick Start
  • LogSnag for SaaS
  • ⚒️SDKs
    • Node
    • React
    • Next
    • Vue
    • Deno
    • Web
    • Python
  • 📖API Reference
    • Log
    • Identify
    • Insight
    • Insight Mutate
  • 🧳Tools
    • Feedback Widget
  • 🤝Integrations
    • Zapier
    • Bubble
    • Unofficial
Powered by GitBook
On this page
  • Usage
  • Add data tags to your button
  • Include User ID
  • Add custom tags

Was this helpful?

  1. Tools

Feedback Widget

PreviousInsight MutateNextZapier

Last updated 1 year ago

Was this helpful?

Frame 525

Usage

Import the widget

<script
  type="module"
  src="https://cdn.logsnag.com/feedback/ls.js"
></script>

Add data tags to your button

<button
  data-logsnag-feedback
  data-logsnag-token="<API_TOKEN>"
  data-logsnag-project="<PROJECT>"
  data-logsnag-channel="<CHANNEL>"
>
  Feedback
</button>

Include User ID

You may include the user id by adding the data-logsnag-user-id tag to your button.

<button
  data-logsnag-feedback
  data-logsnag-token="<API_TOKEN>"
  data-logsnag-project="<PROJECT>"
  data-logsnag-channel="<CHANNEL>"
  data-logsnag-user-id="<USER_ID>"
>
  Feedback
</button>

Add custom tags

You may add custom tags to your feedback widget by adding the following data tags to your button.

<button
  data-logsnag-feedback
  <!-- custom username tag -->
  data-logsnag-tag-username="john.doe"
  data-logsnag-token="<API_TOKEN>"
  data-logsnag-project="<PROJECT>"
  data-logsnag-channel="<CHANNEL>"
>
  Feedback
</button>

Important: Please ensure that your token is set to "Public" and that its roles are limited to the project that you're logging to.

Screen Shot 2022-07-28 at 1 34 17 PM
🧳