Consent-gated boot and self-hosting
Three ways to make sure DebugGo never touches a visitor's browser before they, or you, decided it should.
Which one do you need?
- Only your team reviews the site: use the team-only loader. Visitors never contact DebugGo, so there is nothing to consent to.
- Every visitor can send feedback, and you run a consent tool: load the script from the consent callback.
- You want no third-party request at all, even for the script: self-host the four files.
The team-only loader
This is what the dashboard gives you when a project's visibility is set to Team. It is inline, first-party JavaScript. For an ordinary visitor it checks the URL for debuggo_review and reads one localStorage key, then stops. No request leaves the page, nothing is written, and no DebugGo code beyond these lines runs.
When a teammate opens a review link, the loader injects widget.js, which then loads the review layer. The widget keeps running for that person for 30 days or until they finish the review, because the stored token makes the loader's check pass on every page. The loader only checks that the entry exists, so an expired entry causes one further script load, after which the widget removes it and shows nothing.
The single storage read is the kind of access that privacy rules treat as strictly necessary: without it a reviewer would fall out of their session on every page change. It needs disclosure, not consent. Paste-ready wording is on the text for your privacy policy page. If you chose cookie storage (data-review-storage="cookie"), the loader checks the debuggo_review_<key> cookie instead; the dashboard snippet adjusts for you.
Loading after consent (everyone installs)
If every visitor can open the widget, the plain script tag downloads widget.js from debuggo.dev on every page load. Whether that download needs consent depends on where your visitors are. Where it does, the only pattern that removes the pre-consent request is to insert the script tag itself after consent. Initialising later is not enough, because the download has already happened.
Strict: insert the script after consent
Define one function and call it from your consent tool. The widget initialises itself when the tag appears.
Lighter: initialise after consent
If a script download before consent is acceptable where you operate, you can keep the tag in your HTML with data-auto-init="false" and start it yourself. Until you do, the script runs nothing: no button, no capture, no storage read.
Consent tool callbacks
Examples for Cookiebot, OneTrust, Usercentrics and Klaro. Each one calls the loadDebugGo() function from the strict pattern above; swap in startDebugGo() for the lighter one. Put DebugGo in your tool's functional or preferences category, not in marketing: it does no advertising and no cross-site tracking.
Capture still starts on intent
data-capture at its default, on-open, so console and failed-request capture only begins when the visitor opens the widget, and keep the "Include technical details" checkbox in the form, which is where the visitor decides what to send. See the data sheet for what a report contains.Self-hosting the widget
Serving the widget from your own domain removes the only request an ordinary visitor would otherwise make to DebugGo. Submissions still go to DebugGo when someone presses Send, and review links still call the review API, but nothing leaves the page before that.
1. Copy the four files
2. Point the tag at your copy
data-app-origin tells the widget where the review API lives. Only https://debuggo.dev is accepted as an override; any other value falls back to the script's own origin.
3. Keep it current
A self-hosted copy does not update itself. Re-copy the four files when the changelog announces a widget release; mixing versions between the files breaks the review layer.
Content Security Policy
With self-hosting, your script-src no longer needs debuggo.dev. Submissions and review calls still need connect-src entries for the API and the submission endpoint:
Comparison
| Team-only loader | Load after consent | Self-hosted | |
|---|---|---|---|
| Request to DebugGo before consent | None | None | None |
| Request to DebugGo after consent or review link | Script download, review API | Script download | Submissions and review API only |
| Needs a consent-tool entry | No | Yes | Depends on the mode you install |
| Visitors can send feedback | No | Yes, after consent | Yes, if installed for everyone |
| Maintenance | None | None | Re-copy files on release |
Related pages