Replies: 1 comment
-
I use both Umami and GA4... I think? That's why I created them at least. Can't remember if my self-hosted umami setup is working right now or not. For Umami, you'd have to open a PR to add support for Umami cloud - the current provider doesn't support it. I know I use GA4 at work, and it works just fine. import { googleAnalytics4 } from '@wxt-dev/analytics/providers/google-analytics-4';
export default defineAppConfig({
analytics: {
// Uncomment to send events to debug endpoint
// debug: true,
providers: [
googleAnalytics4({
apiSecret: import.meta.env.WXT_GA_API_SECRET,
measurementId: '...',
}),
],
},
}); Exactly like the docs say. Remember that with GA4, it usually takes 24 hours for events to show up on the dashboard. The "live" view is what I use to check if events are coming through - but it's not very live. There's still a 1 to 4 minute delay before events start showing up there. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Trouble with Google Analytics (Measurement Protocol) + Umami in WXT
I just spent an entire day trying to get Google Analytics 4 via the Measurement Protocol working in my WXT extension — and couldn’t get any events to appear in DebugView. I've also verified the debug/mp/collect requests show no validation messages and a status 200. I'm puzzled by this result!
After carefully following all steps:
• ✅ Events do show up in the network tab as debug/mp/collect
• ❌ But they never appear in GA4 DebugView, despite valid payloads and debug_mode: true
Out of frustration, I decided to try Umami (hosted version) instead — but now I’m getting a 405 error on every request.
Here’s my current setup:
From what I gather in the Umami docs:
• For self-hosted, you can use /api/send
• For Umami Cloud, it seems like you need to use https://api.umami.is and authenticate with an API key
→ However, the umami() WXT provider doesn’t seem to support passing an API key.
⸻
Questions:
• Has anyone gotten GA4 Measurement Protocol to successfully show events in DebugView within a WXT extension?
• Has anyone used Umami Cloud with umami() in WXT successfully? If so, what apiUrl and config did you use?
If I can’t get either working, I’ll likely go back to vanilla gtag, but would love to hear if others solved this first.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions