تخطَّ إلى المحتوى
أمرمستورد

vercel-analytics

Set up Vercel Analytics and Speed Insights for React/Vite projects

وصف مستورد لم يراجعه محرر بعد

جاء هذا العنصر من مستودعه الأصلي وفحصناه آلياً فقط، ولم يكتب له محرر وصفاً عربياً بعد. اقرأ محتواه بنفسك قبل أن تعتمد عليه. ولا تُفهرس هذه الصفحة في محركات البحث حتى تُراجَع.

التنزيل

الملفات: 1 · الحجم: 3 ك.ب

نزّل ملف ZIP

يحمل الملف ترخيص المصدر الأصلي.

التثبيت

بعد التنزيل، شغّل الأمر في الطرفية. يسأل unzip قبل أن يستبدل أي ملف موجود.

  • لهذا المشروع

    يوضع في: .claude/commands/

    mkdir -p .claude/commands && unzip ~/Downloads/vercel-analytics.zip -d .claude/commands

  • لحسابك على الجهاز كله

    يوضع في: ~/.claude/commands/

    mkdir -p ~/.claude/commands && unzip ~/Downloads/vercel-analytics.zip -d ~/.claude/commands

التعليمات

Vercel Analytics Setup

Automatically configure Vercel Analytics and Speed Insights for your React/Vite project.

Usage: /vercel-analytics (no arguments needed)

What it does:

  • Installs @vercel/analytics and @vercel/speed-insights packages
  • Adds components to your React app
  • Configures SPA routing for Vercel deployment
  • Fixes 404 errors for direct route access

Process:

  1. Install Vercel Packages

    npm install @vercel/analytics @vercel/speed-insights
    
  2. Detect Main App File

    • Search for main React entry point:
      • src/App.tsx or src/App.jsx
      • src/main.tsx or src/main.jsx
    • Read file to determine current structure
  3. Add Analytics Components

    • Import Analytics from '@vercel/analytics/react'
    • Import SpeedInsights from '@vercel/speed-insights/react'
    • Add both components to the main App component
    • Use /react imports (not /next)
  4. Create vercel.json Configuration

    • Create vercel.json in project root
    • Add SPA rewrite rules:
    {
      "rewrites": [
        { "source": "/(.*)", "destination": "/index.html" }
      ]
    }
    
    • This ensures all routes serve index.html (fixes 404s)
  5. Verify Setup

    • Confirm components are properly imported
    • Check vercel.json exists and is valid
    • Display success message with next steps

Expected Outcome:

  • ✅ Analytics tracking active
  • ✅ Speed Insights monitoring configured
  • ✅ SPA routing works correctly on Vercel
  • ✅ No 404 errors on direct route access

Next Steps:

  1. Deploy to Vercel: vercel deploy
  2. View analytics at: https://vercel.com/dashboard/analytics
  3. Check Speed Insights: https://vercel.com/dashboard/speed-insights

Note: Works with React, Vite, Create React App, and other SPA frameworks.

الملفات

  • LICENSE1 ك.ب
  • vercel-analytics.md1.9 ك.ب

ما وجده الفحص الآلي

فحصنا الملفات آلياً وقت الاستيراد. هذا ما نبّه إليه الفحص، ولا يعني أن العنصر ضار ولا أنه سليم: اقرأه بنفسك.

  • يحتاج مراجعةأدوات مسموحة بلا حدود

    في الملف cli-tool/components/commands/setup/vercel-analytics.md

التعليقات (0)

لا تعليقات بعد. كن أول من يعلّق.

سجّل الدخول لتعلّق. التعليق من المستوى 1 (عضو).

أبلغ

عناصر مشابهة

  • أمرمستورد

    act

    Execute GitHub Actions locally using act

    MITالملفات: 1

  • أمرمستورد

    add-performance-monitoring

    Setup comprehensive application performance monitoring with metrics, alerting, and observability

    MITالملفات: 1

  • أمرمستورد

    appinsights-instrumentation

    Instrument a webapp to send useful telemetry data to Azure App Insights

    MITالملفات: 1

  • أمرمستورد

    azure-role-selector

    When user is asking for guidance for which role to assign to an identity given desired permissions, this agent helps them understand the role that will meet the requirements with least privilege access and how to apply that role.

    MITالملفات: 1

  • أمرمستورد

    blue-green-deployment

    Implement blue-green deployment strategy with zero-downtime switching, health validation, and automatic rollback

    MITالملفات: 1

  • أمرمستورد

    ci-pipeline

    Manage and automate CI/CD pipeline configuration with GitHub Actions, multi-environment support, and deployment strategies

    MITالملفات: 1