Skip to content

Add Vercel Web Analytics to Astro#1

Merged
thedavidweng merged 1 commit intomainfrom
vercel/vercel-web-analytics-to-astro-i2vjlj
Mar 10, 2026
Merged

Add Vercel Web Analytics to Astro#1
thedavidweng merged 1 commit intomainfrom
vercel/vercel-web-analytics-to-astro-i2vjlj

Conversation

@vercel
Copy link
Copy Markdown
Contributor

@vercel vercel bot commented Mar 10, 2026

Vercel Web Analytics Integration

Successfully installed and configured Vercel Web Analytics for the Astro project.

Changes Made

1. Package Installation

  • Installed @vercel/analytics@1.6.1 using npm
  • Version 1.6.1 meets the requirement of v1.4.0 or later

2. Layout Configuration

Modified: src/layouts/MainLayout.astro

  • Added import statement in the frontmatter: import Analytics from '@vercel/analytics/astro'
  • Added <Analytics /> component in the <head> section, right before the closing </head> tag
  • The component is placed after font preload links to ensure optimal loading

3. Dependencies Updated

Modified: package.json

  • Added @vercel/analytics to dependencies

Modified: package-lock.json

  • Updated lock file with the new package and its dependencies (391 packages added)

Implementation Notes

  • Used default import syntax (import Analytics from '@vercel/analytics/astro') as the package exports the component as a default export
  • The Analytics component automatically tracks page views with route support
  • The component is placed in the <head> section as recommended by Vercel's documentation
  • Preserved all existing code structure and styling

Verification

✅ Build completed successfully with no errors
✅ All 28 tests passed (12 test files)
✅ No linting errors introduced
✅ Lock file properly updated

The Vercel Web Analytics is now ready to collect analytics data when the site is deployed to Vercel.


View Project · Web Analytics

Created by FinDIT Studio (findit-studio) with Vercel Agent

# Vercel Web Analytics Integration

Successfully installed and configured Vercel Web Analytics for the Astro project.

## Changes Made

### 1. Package Installation
- Installed `@vercel/analytics@1.6.1` using npm
- Version 1.6.1 meets the requirement of v1.4.0 or later

### 2. Layout Configuration
**Modified: `src/layouts/MainLayout.astro`**
- Added import statement in the frontmatter: `import Analytics from '@vercel/analytics/astro'`
- Added `<Analytics />` component in the `<head>` section, right before the closing `</head>` tag
- The component is placed after font preload links to ensure optimal loading

### 3. Dependencies Updated
**Modified: `package.json`**
- Added `@vercel/analytics` to dependencies

**Modified: `package-lock.json`**
- Updated lock file with the new package and its dependencies (391 packages added)

## Implementation Notes

- Used default import syntax (`import Analytics from '@vercel/analytics/astro'`) as the package exports the component as a default export
- The Analytics component automatically tracks page views with route support
- The component is placed in the `<head>` section as recommended by Vercel's documentation
- Preserved all existing code structure and styling

## Verification

✅ Build completed successfully with no errors
✅ All 28 tests passed (12 test files)
✅ No linting errors introduced
✅ Lock file properly updated

The Vercel Web Analytics is now ready to collect analytics data when the site is deployed to Vercel.

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
@vercel
Copy link
Copy Markdown
Contributor Author

vercel bot commented Mar 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
findit-studio-site Ready Ready Preview, Comment Mar 10, 2026 5:58am

@thedavidweng thedavidweng marked this pull request as ready for review March 10, 2026 06:15
@thedavidweng thedavidweng merged commit 88938a6 into main Mar 10, 2026
3 checks passed
thedavidweng pushed a commit that referenced this pull request Mar 30, 2026
#8 Pipeline mergeResults: Gemini/VLM results now merged with existing
local analysis (step 2f) instead of overwriting, preventing data loss
when remote returns empty fields. Added AnalysisResult.fromClip().

#1 SyncEngine N+1 query: Build video ID mapping dict before clip sync
loop. Reduces per-clip SELECT from O(N) to O(1). SQL construction
also moved outside the batch loop.

#4 RateLimiter race: Changed `if` to `while` loop after sleep in
waitForPermission(), ensuring window capacity is rechecked after
actor re-entry from concurrent Tasks.

#7 Embedding tags duplication: Removed tags from composeClipText()
since their content is already covered by the vision fields they
were composed from. Avoids diluting embedding semantic focus.
thedavidweng pushed a commit that referenced this pull request Mar 30, 2026
MCP Server 精简为只读模式(移除 4 个写 tools),同时采纳 PR #1 中的
多项搜索增强:

Core 层:
- SearchResult 新增 5 个 vision 字段 (subjects/actions/objects/lighting/colors)
- FTS5 索引从 4 列扩展到 10 列 + bm25 加权排名
- 新增迁移 v9_expandFTS5Index

MCP Server:
- 移除 add_tags/remove_tags/set_rating/set_color_label (10→7 tools)
- 新增 BrowseAllClipsTool (全量浏览 + 分页 + 过滤 + 排序)
- SearchTool: 激活向量搜索 (DatabaseContext 懒初始化 EmbeddingProvider +
  VectorStore),新增 offset 分页 + folder 过滤,输出补全 vision 字段
- GetVideoDetailTool: ClipSummary 补全 vision 字段
- 新增 TagParsingHelpers 兼容空格分隔和 JSON 数组两种 tags 格式
- limit/offset 输入防护 (clamp 防负数 crash)

测试: 784 tests, 0 failures

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
thedavidweng pushed a commit that referenced this pull request Mar 30, 2026
- #1 USearch TOCTOU: ensureCapacity + index.add 合并为同一个 lock 临界区
- #2 SigLIP2 EOS: 先 truncate 到 maxLen-1 再 append EOS,保证 EOS 始终存在
- #3 NLEmbedding 512d 回退: 移除 IndexingManager/SearchState 的 NLEmbeddingProvider 回退
- #4+#6 代码去重: l2Normalize 提取到 EmbeddingUtils,CLI cosineSimilarity 调用共享方法
- #7 融合路径统一: hybridSearch 委托 threeWaySearch,删除 fusionSearch (~90 行)
- #8 normalizeScores: range=0 时返回 1.0 而非 0.0,单一命中不被清零
- #12 全局库 clip_vectors 加 created_at 列 (v11 迁移)
- #9 VectorStore 注释修正

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant