mirror of
https://github.com/alexandrev/xslt-lab.git
synced 2026-09-22 05:33:16 +00:00
Add user feedback improvements: server error reporting, Clarity analytics, usage survey
- Auto-report link on 5xx/network errors: pre-fills GitHub issue with version, error, and stylesheet snippet - Microsoft Clarity: conditional on VITE_CLARITY_ID env var, loaded after page load - Usage survey: appears after 3 successful transforms, fires GA4 event, one-shot (stored in localStorage) - 27 tests passing (10 new tests covering buildBugReportUrl, server error detection, survey lifecycle)
This commit is contained in:
@@ -103,6 +103,17 @@
|
||||
}
|
||||
</style>
|
||||
<script type="module" src="/env.js"></script>
|
||||
<script>
|
||||
window.addEventListener("load", function () {
|
||||
var clarityId = window.env && window.env.VITE_CLARITY_ID;
|
||||
if (!clarityId) return;
|
||||
(function (c, l, a, r, i, t, y) {
|
||||
c[a] = c[a] || function () { (c[a].q = c[a].q || []).push(arguments); };
|
||||
t = l.createElement(r); t.async = 1; t.src = "https://www.clarity.ms/tag/" + i;
|
||||
y = l.getElementsByTagName(r)[0]; y.parentNode.insertBefore(t, y);
|
||||
})(window, document, "clarity", "script", clarityId);
|
||||
}, { once: true });
|
||||
</script>
|
||||
<script>
|
||||
const loadAdsense = () => {
|
||||
const client = window.env && window.env.VITE_ADSENSE_CLIENT;
|
||||
|
||||
Reference in New Issue
Block a user