Skip to content

docs(playground): add Swetrix pageview/error tracking - #896

Merged
johnleider merged 2 commits into
masterfrom
cursor/add-swetrix-playground-8bab
Aug 20, 2026
Merged

docs(playground): add Swetrix pageview/error tracking#896
johnleider merged 2 commits into
masterfrom
cursor/add-swetrix-playground-8bab

Conversation

@johnleider

Copy link
Copy Markdown
Member

Summary

Adds Swetrix analytics to the v0play app (apps/playground) to track pageviews and errors on https://v0play.vuetifyjs.com.

Changes:

  • Created apps/playground/src/plugins/analytics.ts with Swetrix initialization for pid NYQnHCV4oCFA using the Vuetify Swetrix API endpoint
  • Imported the analytics plugin in main.ts inside the existing if (!import.meta.env.SSR) block to ensure tracking only runs in the browser
  • Added swetrix dependency to playground using the workspace catalog ("swetrix": "catalog:")

The implementation mirrors the existing docs analytics pattern but uses requestIdleCallback with a 2s timeout fallback instead of useIdleCallback (which playground doesn't have).

Test plan

Open in Web Open in Cursor 

Add analytics plugin to track pageviews and errors on v0play.vuetifyjs.com.

- Create analytics plugin with pid NYQnHCV4oCFA and Vuetify Swetrix API
- Import plugin in main.ts inside SSR guard block
- Add swetrix dependency using workspace catalog
@johnleider johnleider added the documentation Improvements or additions to documentation label Aug 20, 2026 — with Cursor
@johnleider johnleider added this to the v1.0.x milestone Aug 20, 2026
@johnleider johnleider self-assigned this Aug 20, 2026
@johnleider
johnleider merged commit 37f44d8 into master Aug 20, 2026
22 checks passed
@johnleider
johnleider deleted the cursor/add-swetrix-playground-8bab branch August 20, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants