PrismUV
App

PrismUV 1-Line Integration, API & AI Agent Docs

Enter your Site ID below once — every 1-line script tag, framework snippet, curl example, MCP config, and AI coding prompt updates automatically.

Simplest Setup: Just 1 Single JS File

/s/{site_id}/prismuv.js embeds your site ID, endpoint URL, AdGuard mode, and <4KB tracker inside one standalone script (legacy /p/{site_id}.js also supported).

<script defer src="https://prismuv.com/s/your-site/prismuv.js"></script>

Framework Integration Templates

1-Line HTML — site=your-site
<!-- 只需这一行 JS 文件,粘贴到 <head> 即可开箱采集 + 广告守护 + 崩溃监听 -->
<script defer src="https://prismuv.com/s/your-site/prismuv.js"></script>

<!-- 可选:如需自定义发布版本号或覆盖默认策略,加对应 data-* 属性即可 -->
<!-- <script defer src="https://prismuv.com/s/your-site/prismuv.js" data-release="v1.0.0" data-adguard="shadow"></script> -->

Custom Conversions, Revenue Goals & Fail-Open AdGuard

window.pvuv(...) & __prismVerdict
// Track custom tool execution or signup conversion
window.pvuv?.('event', 'tool_run_success', { tool: 'image-compressor', format: 'webp' });

// Track paid purchase with USD revenue attribution
window.pvuv?.('event', 'pro_upgrade', { revenue: 19.0, plan: 'pro' });

// Identify logged-in user (optional)
window.pvuv?.('identify', 'user_123', { tier: 'pro' });

// Fail-Open AdGuard helper (optional custom slot guard)
const allowAds = window.__prismVerdict
  ? (window.__prismVerdict.shadow || window.__prismVerdict.allow_ads !== false)
  : true;

Open REST API & CSV Exports

REST API v1 + CSV Export
curl -H "Authorization: Bearer prism_live_YOUR_TOKEN" \
  "https://prismuv.com/v1/sites/your-site/overview?period=7d"

curl -H "Authorization: Bearer prism_live_YOUR_TOKEN" \
  "https://prismuv.com/v1/sites/your-site/export.csv?kind=pages&period=7d" -o pages.csv

AI Coding Tools, MCP Server & Official Agent Skill

One-Shot AI Integration Prompt (Claude Code / Cursor / Codex)

Integrate PrismUV in 1 line (full specification at https://prismuv.com/docs/prismuv-skill.md):
1. Add this single pre-configured script to the root layout (<head> or Next.js RootLayout):
   <script defer src="https://prismuv.com/s/your-site/prismuv.js"></script>
2. Fire window.pvuv?.('event', 'tool_run_success') on primary conversion callbacks (include { revenue } in USD for paid actions).
3. Keep any ad slot rendering Fail-Open, run build, then verify live delivery via POST /v1/sites/your-site/verify-install (if proxied on /_t/*, confirm /_t/f.js returns the live SDK and NOT a fail_open stub).
Install Official PrismUV SKILL.md into Any Project
mkdir -p .agents/skills/prismuv-analytics
curl -fsSL https://prismuv.com/docs/prismuv-skill.md -o .agents/skills/prismuv-analytics/SKILL.md
prismuv-mcp (Claude Code / Cursor / OpenAI Codex CLI)
{
  "mcpServers": {
    "prismuv": {
      "command": "node",
      "args": [
        "/ABS/PATH/TO/prismuv/mcp/index.mjs"
      ],
      "env": {
        "PRISMUV_API_URL": "https://prismuv.com",
        "PRISMUV_TOKEN": "prism_live_YOUR_TOKEN"
      }
    }
  }
}
Included MCP Tools (36 Tools)
list_sites
List active sites & AdGuard policies
create_site
Register new site via write-scoped token
get_fleet_overview
Multi-site human UV, purity & errors
get_fleet_geo
Portfolio-wide country breakdown
get_site_overview
Headline clean UV, bounce, conv & revenue
get_realtime
30m minute pulse & live streaming events
get_geo_map
Country clean UV, AI crawls & bot blocks
get_timeseries
Hourly/daily spectrum series + deploy pins
get_pages_funnel
Page rank by dwell, scroll & goal conv
get_breakdown
18+ dims: UTM, AI ref, device, entry/exit
list_funnels
Configured conversion funnels on site
get_funnel_report
Step-by-step drop-off evaluation
get_traffic_quality
Verdicts, bot signals & risky sessions
get_ai_crawlers
Edge GPTBot/ClaudeBot crawls + AI refs
get_js_errors
Release-grouped JS crashes + P75 Vitals
get_adguard_simulation
Loose/Balanced/Strict AdSense simulation
get_session_timeline
Chronological events & risk flags for session
run_self_test
Infrastructure, scoring & handshake diagnostic
run_geo_audit
Run 100-pt GEO citability & robots.txt audit
get_geo_audits
List historical GEO audit scores & fixes
list_keywords
List tracked keywords, volume, CPC & ranks
add_keywords
Add target keywords for site monitoring
check_keywords
Verify keyword coverage on live target pages
pull_ranked_keywords
Pull ranked keywords via DataForSEO
enrich_keywords_serp
Fetch volume, CPC, Google rank & PAA
get_gsc_queries
Fetch synced Google Search Console queries
generate_growth_plan
Synthesize P0-P2 optimization tasks & fix prompts
list_growth_tasks
List Copilot work orders & Before/After deltas
update_growth_task
Mark Copilot task applied with telemetry baseline
generate_geo_assets
Generate llms.txt, llms-full.txt & JSON-LD
get_revenue_summary
Verified Creem/Stripe revenue, refunds & RPV breakdown
get_keyword_history
30d/90d keyword rank & fit snapshots + releases
get_geo_trend
Multi-day GEO citability score progression + releases
run_sitemap_geo_audit
Batch crawl /sitemap.xml & rank worst GEO inner pages
run_ai_citation_check
Probe Google AI Overview & ChatGPT Web brand citations
get_ai_visibility_report
AI Share-of-Voice, competitors & 3rd-party sources

Built-in Self-Diagnostics & Live Verification

1. 6-Point Infrastructure Self-Test

Click Run Self-Test inside any Site Observatory -> Install & Export tab to verify PostgreSQL, monthly partitioning, IVT scoring, GEO classification, <4KB SDK bundle, and handshake connectivity.

2. Live HTML Tag & SDK Bundle Verifier

Enter any production URL and click Verify Tag to detect `/s/{site_id}/prismuv.js`, `/prismuv.js`, `/_t/f.js`, or legacy `/p/{site_id}.js`, fetch the served SDK bundle, and reject Cloudflare Worker fail_open stubs.