mirror of
https://github.com/mengjian-github/openclaw101.git
synced 2026-09-01 15:35:09 +08:00
fix: improve openclaw101 lead proxy tracking
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<xhtml:link rel="alternate" hreflang="en" href="https://openclaw101.dev/"/>
|
||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://openclaw101.dev/zh"/>
|
||||
<xhtml:link rel="alternate" hreflang="x-default" href="https://openclaw101.dev/"/>
|
||||
<lastmod>2026-07-01T00:26:36.973Z</lastmod>
|
||||
<lastmod>2026-07-05T02:02:21.093Z</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
@@ -14,7 +14,7 @@
|
||||
<xhtml:link rel="alternate" hreflang="en" href="https://openclaw101.dev/"/>
|
||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://openclaw101.dev/zh"/>
|
||||
<xhtml:link rel="alternate" hreflang="x-default" href="https://openclaw101.dev/"/>
|
||||
<lastmod>2026-07-01T00:26:36.973Z</lastmod>
|
||||
<lastmod>2026-07-05T02:02:21.093Z</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
@@ -23,7 +23,7 @@
|
||||
<xhtml:link rel="alternate" hreflang="en" href="https://openclaw101.dev/resources"/>
|
||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://openclaw101.dev/zh/resources"/>
|
||||
<xhtml:link rel="alternate" hreflang="x-default" href="https://openclaw101.dev/resources"/>
|
||||
<lastmod>2026-07-01T00:27:59.948Z</lastmod>
|
||||
<lastmod>2026-07-05T02:01:56.695Z</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
@@ -32,7 +32,7 @@
|
||||
<xhtml:link rel="alternate" hreflang="en" href="https://openclaw101.dev/resources"/>
|
||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://openclaw101.dev/zh/resources"/>
|
||||
<xhtml:link rel="alternate" hreflang="x-default" href="https://openclaw101.dev/resources"/>
|
||||
<lastmod>2026-07-01T00:27:59.948Z</lastmod>
|
||||
<lastmod>2026-07-05T02:01:56.695Z</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
@@ -41,7 +41,7 @@
|
||||
<xhtml:link rel="alternate" hreflang="en" href="https://openclaw101.dev/start"/>
|
||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://openclaw101.dev/zh/start"/>
|
||||
<xhtml:link rel="alternate" hreflang="x-default" href="https://openclaw101.dev/start"/>
|
||||
<lastmod>2026-07-04T02:12:40.164Z</lastmod>
|
||||
<lastmod>2026-07-05T02:04:40.689Z</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
@@ -50,7 +50,7 @@
|
||||
<xhtml:link rel="alternate" hreflang="en" href="https://openclaw101.dev/start"/>
|
||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://openclaw101.dev/zh/start"/>
|
||||
<xhtml:link rel="alternate" hreflang="x-default" href="https://openclaw101.dev/start"/>
|
||||
<lastmod>2026-07-04T02:12:40.164Z</lastmod>
|
||||
<lastmod>2026-07-05T02:04:40.689Z</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
@@ -59,7 +59,7 @@
|
||||
<xhtml:link rel="alternate" hreflang="en" href="https://openclaw101.dev/openclaw-tutorial"/>
|
||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://openclaw101.dev/zh/start"/>
|
||||
<xhtml:link rel="alternate" hreflang="x-default" href="https://openclaw101.dev/openclaw-tutorial"/>
|
||||
<lastmod>2026-07-04T02:14:44.289Z</lastmod>
|
||||
<lastmod>2026-07-05T02:07:23.389Z</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
|
||||
+7
-7
@@ -5,7 +5,7 @@
|
||||
<xhtml:link rel="alternate" hreflang="en" href="https://openclaw101.dev/"/>
|
||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://openclaw101.dev/zh"/>
|
||||
<xhtml:link rel="alternate" hreflang="x-default" href="https://openclaw101.dev/"/>
|
||||
<lastmod>2026-07-01T00:26:36.973Z</lastmod>
|
||||
<lastmod>2026-07-05T02:02:21.093Z</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
@@ -14,7 +14,7 @@
|
||||
<xhtml:link rel="alternate" hreflang="en" href="https://openclaw101.dev/"/>
|
||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://openclaw101.dev/zh"/>
|
||||
<xhtml:link rel="alternate" hreflang="x-default" href="https://openclaw101.dev/"/>
|
||||
<lastmod>2026-07-01T00:26:36.973Z</lastmod>
|
||||
<lastmod>2026-07-05T02:02:21.093Z</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
@@ -23,7 +23,7 @@
|
||||
<xhtml:link rel="alternate" hreflang="en" href="https://openclaw101.dev/resources"/>
|
||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://openclaw101.dev/zh/resources"/>
|
||||
<xhtml:link rel="alternate" hreflang="x-default" href="https://openclaw101.dev/resources"/>
|
||||
<lastmod>2026-07-01T00:27:59.948Z</lastmod>
|
||||
<lastmod>2026-07-05T02:01:56.695Z</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
@@ -32,7 +32,7 @@
|
||||
<xhtml:link rel="alternate" hreflang="en" href="https://openclaw101.dev/resources"/>
|
||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://openclaw101.dev/zh/resources"/>
|
||||
<xhtml:link rel="alternate" hreflang="x-default" href="https://openclaw101.dev/resources"/>
|
||||
<lastmod>2026-07-01T00:27:59.948Z</lastmod>
|
||||
<lastmod>2026-07-05T02:01:56.695Z</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
@@ -41,7 +41,7 @@
|
||||
<xhtml:link rel="alternate" hreflang="en" href="https://openclaw101.dev/start"/>
|
||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://openclaw101.dev/zh/start"/>
|
||||
<xhtml:link rel="alternate" hreflang="x-default" href="https://openclaw101.dev/start"/>
|
||||
<lastmod>2026-07-04T02:12:40.164Z</lastmod>
|
||||
<lastmod>2026-07-05T02:04:40.689Z</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
@@ -50,7 +50,7 @@
|
||||
<xhtml:link rel="alternate" hreflang="en" href="https://openclaw101.dev/start"/>
|
||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://openclaw101.dev/zh/start"/>
|
||||
<xhtml:link rel="alternate" hreflang="x-default" href="https://openclaw101.dev/start"/>
|
||||
<lastmod>2026-07-04T02:12:40.164Z</lastmod>
|
||||
<lastmod>2026-07-05T02:04:40.689Z</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
@@ -59,7 +59,7 @@
|
||||
<xhtml:link rel="alternate" hreflang="en" href="https://openclaw101.dev/openclaw-tutorial"/>
|
||||
<xhtml:link rel="alternate" hreflang="zh-CN" href="https://openclaw101.dev/zh/start"/>
|
||||
<xhtml:link rel="alternate" hreflang="x-default" href="https://openclaw101.dev/openclaw-tutorial"/>
|
||||
<lastmod>2026-07-04T02:14:44.289Z</lastmod>
|
||||
<lastmod>2026-07-05T02:07:23.389Z</lastmod>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
|
||||
@@ -56,6 +56,9 @@ function buildSitemapXml() {
|
||||
'src/app/page.tsx',
|
||||
'src/app/zh/page.tsx',
|
||||
'src/components/HomePage.tsx',
|
||||
'src/components/Hero.tsx',
|
||||
'src/components/ResourcesSection.tsx',
|
||||
'src/components/Footer.tsx',
|
||||
'src/lib/seo.ts',
|
||||
]);
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { Metadata } from 'next';
|
||||
import Link from 'next/link';
|
||||
import TutorialTrackedLink from '@/components/TutorialTrackedLink';
|
||||
import TrackedOutboundLink from '@/components/TrackedOutboundLink';
|
||||
import { SITE_NAME, SITE_URL, buildPageMetadata, getStructuredDataLanguage } from '@/lib/seo';
|
||||
|
||||
export const metadata: Metadata = buildPageMetadata({
|
||||
@@ -156,6 +157,30 @@ const nextStepCards = [
|
||||
},
|
||||
];
|
||||
|
||||
const leadProxyCards = [
|
||||
{
|
||||
title: 'Guided course path',
|
||||
body: 'For readers who want a complete first-assistant build with fewer dead ends.',
|
||||
href: 'https://xiaomo.dev/course/openclaw-ai-assistant/?utm_source=openclaw101&utm_medium=openclaw_tutorial&utm_campaign=lead_proxy',
|
||||
label: 'View course',
|
||||
eventName: 'course_click' as const,
|
||||
},
|
||||
{
|
||||
title: 'Community troubleshooting',
|
||||
body: 'Best after the reader has a first-run screenshot, token state, or terminal log.',
|
||||
href: 'https://discord.com/invite/clawd?utm_source=openclaw101&utm_medium=openclaw_tutorial&utm_campaign=lead_proxy',
|
||||
label: 'Open community',
|
||||
eventName: 'community_click' as const,
|
||||
},
|
||||
{
|
||||
title: 'Skill and workflow catalog',
|
||||
body: 'For readers who already got a first reply and now need reusable skills or workflows.',
|
||||
href: 'https://www.skill-cn.com?utm_source=openclaw101&utm_medium=openclaw_tutorial&utm_campaign=product_referral',
|
||||
label: 'Browse Skill Hub CN',
|
||||
eventName: 'product_referral' as const,
|
||||
},
|
||||
];
|
||||
|
||||
const jsonLd = {
|
||||
'@context': 'https://schema.org',
|
||||
'@graph': [
|
||||
@@ -197,7 +222,7 @@ const jsonLd = {
|
||||
headline: 'OpenClaw Tutorial: Beginner Setup Guide',
|
||||
description: 'Install OpenClaw, connect Telegram, verify the first assistant reply, and continue through the 7-day learning path.',
|
||||
datePublished: '2026-06-30',
|
||||
dateModified: '2026-07-04',
|
||||
dateModified: '2026-07-05',
|
||||
inLanguage: getStructuredDataLanguage('en'),
|
||||
author: { '@type': 'Organization', name: SITE_NAME, url: SITE_URL },
|
||||
publisher: { '@type': 'Organization', name: SITE_NAME, url: SITE_URL },
|
||||
@@ -359,6 +384,29 @@ export default function OpenClawTutorialPage() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="px-4 pb-20">
|
||||
<div className="mx-auto max-w-5xl rounded-3xl border border-emerald-400/20 bg-emerald-400/10 p-6 sm:p-8">
|
||||
<div className="max-w-3xl">
|
||||
<div className="text-sm font-bold uppercase tracking-[0.18em] text-emerald-200/75">Lead proxy, no paid action</div>
|
||||
<h2 className="mt-3 text-2xl font-black">If the OpenClaw tutorial worked, route the next intent</h2>
|
||||
<p className="mt-3 text-sm leading-6 text-white/62">
|
||||
These links do not trigger payment or public posting. They turn course interest, community help, and product-referral intent into measurable lead proxies for the next site review.
|
||||
</p>
|
||||
</div>
|
||||
<div className="mt-6 grid gap-4 md:grid-cols-3">
|
||||
{leadProxyCards.map((card) => (
|
||||
<article key={card.href} className="rounded-2xl border border-white/10 bg-gray-950/55 p-5">
|
||||
<h3 className="text-lg font-black text-white">{card.title}</h3>
|
||||
<p className="mt-3 text-sm leading-6 text-white/62">{card.body}</p>
|
||||
<TrackedOutboundLink eventName={card.eventName} source="openclaw_tutorial_lead_proxy" analyticsTarget={card.href} locale="en" href={card.href} target="_blank" rel="noopener noreferrer" className="mt-5 inline-flex text-sm font-bold text-emerald-200 hover:text-emerald-100">
|
||||
{card.label} →
|
||||
</TrackedOutboundLink>
|
||||
</article>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="px-4 pb-24">
|
||||
<div className="mx-auto max-w-5xl rounded-3xl border border-white/10 bg-white/[0.04] p-6 sm:p-8">
|
||||
<h2 className="text-2xl font-black">OpenClaw tutorial FAQ</h2>
|
||||
|
||||
@@ -20,10 +20,10 @@ export default function Footer({ locale, dict }: FooterProps) {
|
||||
{isZh ? '官方' : 'Official'}
|
||||
</h4>
|
||||
<ul className="space-y-1.5 sm:space-y-2 text-xs sm:text-sm" style={{ color: 'rgba(255,255,255,0.5)' }}>
|
||||
<li><a href="https://openclaw.ai" target="_blank" rel="noopener noreferrer" className="hover:text-white transition-colors">{isZh ? 'OpenClaw 官网' : 'OpenClaw Website'}</a></li>
|
||||
<li><TrackedOutboundLink eventName="product_referral" source="footer_openclaw_official" analyticsTarget="https://openclaw.ai" locale={locale} href="https://openclaw.ai" target="_blank" rel="noopener noreferrer" className="hover:text-white transition-colors">{isZh ? 'OpenClaw 官网' : 'OpenClaw Website'}</TrackedOutboundLink></li>
|
||||
<li><TrackedOutboundLink eventName="product_referral" source="footer_official_docs" analyticsTarget="https://docs.openclaw.ai" locale={locale} href="https://docs.openclaw.ai" target="_blank" rel="noopener noreferrer" className="hover:text-white transition-colors">{isZh ? '官方文档' : 'Documentation'}</TrackedOutboundLink></li>
|
||||
<li><a href="https://github.com/openclaw/openclaw" target="_blank" rel="noopener noreferrer" className="hover:text-white transition-colors">OpenClaw GitHub (354k+ ⭐)</a></li>
|
||||
<li><a href="https://clawhub.com" target="_blank" rel="noopener noreferrer" className="hover:text-white transition-colors">{isZh ? 'ClawHub 技能市场' : 'ClawHub Skills'}</a></li>
|
||||
<li><TrackedOutboundLink eventName="product_referral" source="footer_openclaw_github" analyticsTarget="https://github.com/openclaw/openclaw" locale={locale} href="https://github.com/openclaw/openclaw" target="_blank" rel="noopener noreferrer" className="hover:text-white transition-colors">OpenClaw GitHub (354k+ ⭐)</TrackedOutboundLink></li>
|
||||
<li><TrackedOutboundLink eventName="product_referral" source="footer_clawhub" analyticsTarget="https://clawhub.com" locale={locale} href="https://clawhub.com" target="_blank" rel="noopener noreferrer" className="hover:text-white transition-colors">{isZh ? 'ClawHub 技能市场' : 'ClawHub Skills'}</TrackedOutboundLink></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>
|
||||
@@ -34,7 +34,7 @@ export default function Footer({ locale, dict }: FooterProps) {
|
||||
<li><a href={isZh ? '/zh/start' : '/openclaw-tutorial'} className="hover:text-white transition-colors font-medium">{isZh ? 'OpenClaw 初学者教程' : 'OpenClaw tutorial for beginners'}</a></li>
|
||||
<li><a href={`${prefix || '/'}#getting-started`} className="hover:text-white transition-colors">{isZh ? '7天学习路径' : '7-Day Path'}</a></li>
|
||||
<li><a href={`${prefix}/resources`} className="hover:text-white transition-colors">{isZh ? '全部资源' : 'All Resources'}</a></li>
|
||||
<li><a href="https://my.feishu.cn/wiki/YkWgwqSchi9xW3kEuZscAm0lnFf" target="_blank" rel="noopener noreferrer" className="hover:text-white transition-colors">{isZh ? '飞书知识库' : 'Feishu Wiki'}</a></li>
|
||||
<li><TrackedOutboundLink eventName="resource_click" source="footer_feishu_wiki" analyticsTarget="https://my.feishu.cn/wiki/YkWgwqSchi9xW3kEuZscAm0lnFf" locale={locale} href="https://my.feishu.cn/wiki/YkWgwqSchi9xW3kEuZscAm0lnFf" target="_blank" rel="noopener noreferrer" className="hover:text-white transition-colors">{isZh ? '飞书知识库' : 'Feishu Wiki'}</TrackedOutboundLink></li>
|
||||
<li><a href={`${prefix || '/'}#skills`} className="hover:text-white transition-colors">{isZh ? '技能推荐' : 'Featured Skills'}</a></li>
|
||||
{isZh && (
|
||||
<li>
|
||||
@@ -52,9 +52,9 @@ export default function Footer({ locale, dict }: FooterProps) {
|
||||
</h4>
|
||||
<ul className="space-y-1.5 sm:space-y-2 text-xs sm:text-sm" style={{ color: 'rgba(255,255,255,0.5)' }}>
|
||||
<li><TrackedOutboundLink eventName="community_click" source="footer_discord" analyticsTarget="https://discord.com/invite/clawd" locale={locale} href="https://discord.com/invite/clawd" target="_blank" rel="noopener noreferrer" className="hover:text-white transition-colors">Discord</TrackedOutboundLink></li>
|
||||
<li><a href="https://www.reddit.com/r/ThinkingDeeplyAI/" target="_blank" rel="noopener noreferrer" className="hover:text-white transition-colors">Reddit</a></li>
|
||||
<li><a href="https://xiaomo.dev" target="_blank" rel="noopener noreferrer" className="hover:text-white transition-colors">🐈⬛ {isZh ? '认识小墨' : 'Meet Xiaomo'}</a></li>
|
||||
<li><a href="https://github.com/mengjian-github/openclaw101" target="_blank" rel="noopener noreferrer" className="hover:text-white transition-colors">{isZh ? '贡献资源 (PR)' : 'Contribute (PR)'}</a></li>
|
||||
<li><TrackedOutboundLink eventName="community_click" source="footer_reddit" analyticsTarget="https://www.reddit.com/r/ThinkingDeeplyAI/" locale={locale} href="https://www.reddit.com/r/ThinkingDeeplyAI/" target="_blank" rel="noopener noreferrer" className="hover:text-white transition-colors">Reddit</TrackedOutboundLink></li>
|
||||
<li><TrackedOutboundLink eventName="consulting_click" source="footer_meet_xiaomo" analyticsTarget="https://xiaomo.dev" locale={locale} href="https://xiaomo.dev" target="_blank" rel="noopener noreferrer" className="hover:text-white transition-colors">🐈⬛ {isZh ? '认识小墨' : 'Meet Xiaomo'}</TrackedOutboundLink></li>
|
||||
<li><TrackedOutboundLink eventName="resource_click" source="footer_contribute_pr" analyticsTarget="https://github.com/mengjian-github/openclaw101" locale={locale} href="https://github.com/mengjian-github/openclaw101" target="_blank" rel="noopener noreferrer" className="hover:text-white transition-colors">{isZh ? '贡献资源 (PR)' : 'Contribute (PR)'}</TrackedOutboundLink></li>
|
||||
<li><TrackedOutboundLink eventName="product_referral" source="footer_skill_hub_cn" analyticsTarget="https://www.skill-cn.com?from=openclaw101" locale={locale} href="https://www.skill-cn.com?from=openclaw101" target="_blank" rel="noopener noreferrer" className="hover:text-white transition-colors">{isZh ? 'Skill Hub 中国' : 'Skill Hub CN'}</TrackedOutboundLink></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
type ResourceCategory,
|
||||
} from '@/data/resources';
|
||||
import ConsultButton from './ConsultButton';
|
||||
import { trackEvent } from '@/lib/analytics';
|
||||
|
||||
/* ── i18n texts ── */
|
||||
const texts = {
|
||||
@@ -173,13 +174,21 @@ interface ResourcesPageProps {
|
||||
}
|
||||
|
||||
/* ── card ── */
|
||||
function Card({ r, color, t }: { r: Resource; color: string; t: typeof texts.en }) {
|
||||
function Card({ r, color, t, locale }: { r: Resource; color: string; t: typeof texts.en; locale: 'en' | 'zh' }) {
|
||||
const dotColor = sourceDots[r.source] || '#9ca3af';
|
||||
return (
|
||||
<a
|
||||
href={r.url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
onClick={() => trackEvent('resource_click', {
|
||||
locale,
|
||||
page: locale === 'zh' ? '/zh/resources' : '/resources',
|
||||
source: 'resource_hub_card',
|
||||
target: r.url,
|
||||
resource_source: r.source,
|
||||
resource_category: r.category,
|
||||
})}
|
||||
className="group relative block rounded-xl p-5 border border-gray-100 hover:border-gray-200 hover:shadow-lg transition-all duration-300 hover:-translate-y-0.5 overflow-hidden"
|
||||
style={{
|
||||
background: r.featured ? 'linear-gradient(135deg, #fffbeb 0%, #ffffff 40%)' : '#fff',
|
||||
@@ -273,7 +282,7 @@ function CategorySection({
|
||||
{/* cards grid */}
|
||||
<div className="grid sm:grid-cols-2 lg:grid-cols-3 gap-4">
|
||||
{items.map((r) => (
|
||||
<Card key={r.url} r={r} color={color} t={t} />
|
||||
<Card key={r.url} r={r} color={color} t={t} locale={locale} />
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
@@ -368,6 +377,12 @@ export default function ResourcesPage({ locale }: ResourcesPageProps) {
|
||||
placeholder={t.searchPlaceholder}
|
||||
value={search}
|
||||
onChange={(e) => setSearch(e.target.value)}
|
||||
onFocus={() => trackEvent('resource_click', {
|
||||
locale,
|
||||
page: locale === 'zh' ? '/zh/resources' : '/resources',
|
||||
source: 'resource_search_focus',
|
||||
target: 'search',
|
||||
})}
|
||||
className="w-full pl-12 pr-4 py-3 rounded-xl text-sm text-white placeholder-white/30 focus:outline-none focus:ring-2 focus:ring-blue-400/40 transition-all"
|
||||
style={{ background: 'rgba(255,255,255,0.08)', border: '1px solid rgba(255,255,255,0.12)' }}
|
||||
/>
|
||||
@@ -454,7 +469,7 @@ export default function ResourcesPage({ locale }: ResourcesPageProps) {
|
||||
</div>
|
||||
) : (
|
||||
<div className="grid sm:grid-cols-2 lg:grid-cols-3 gap-4">
|
||||
{searchResults.map((r) => <Card key={r.url} r={r} color="blue" t={t} />)}
|
||||
{searchResults.map((r) => <Card key={r.url} r={r} color="blue" t={t} locale={locale} />)}
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { getFeaturedResources, categoryMeta, stats, type Resource } from '@/data/resources';
|
||||
import { Dictionary } from '@/lib/i18n';
|
||||
import { trackEvent } from '@/lib/analytics';
|
||||
|
||||
interface ResourcesSectionProps {
|
||||
locale: 'en' | 'zh';
|
||||
@@ -27,6 +28,14 @@ function ResourceCard({ r, i, isZh }: { r: Resource; i: number; isZh: boolean })
|
||||
href={r.url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
onClick={() => trackEvent('resource_click', {
|
||||
locale: isZh ? 'zh' : 'en',
|
||||
page: isZh ? '/zh' : '/',
|
||||
source: 'featured_resource_card',
|
||||
target: r.url,
|
||||
resource_source: r.source,
|
||||
resource_category: r.category,
|
||||
})}
|
||||
className="reveal card-hover group block bg-white rounded-xl sm:rounded-2xl p-4 sm:p-5 md:p-6 border border-gray-100 hover:border-gray-200 relative"
|
||||
style={{ transitionDelay: `${i * 60}ms` }}
|
||||
>
|
||||
@@ -159,6 +168,12 @@ export default function ResourcesSection({ locale, dict }: ResourcesSectionProps
|
||||
<div className="text-center reveal">
|
||||
<a
|
||||
href={`${prefix}/resources`}
|
||||
onClick={() => trackEvent('resource_click', {
|
||||
locale,
|
||||
page: isZh ? '/zh' : '/',
|
||||
source: 'resources_section_view_all',
|
||||
target: `${prefix}/resources`,
|
||||
})}
|
||||
className="group inline-flex items-center gap-2 px-8 py-4 bg-gray-900 hover:bg-gray-800 text-white font-semibold rounded-xl transition-all duration-300 hover:shadow-lg hover:-translate-y-0.5"
|
||||
>
|
||||
{isZh ? `查看全部 ${stats.totalResources}+ 篇资源` : `View All ${stats.totalResources}+ Resources`}
|
||||
|
||||
@@ -99,6 +99,55 @@ const copy = {
|
||||
},
|
||||
} as const;
|
||||
|
||||
const leadOptions = {
|
||||
en: [
|
||||
{
|
||||
title: 'Want a guided setup?',
|
||||
body: 'Use the course path when you want a structured first assistant build instead of debugging alone.',
|
||||
label: 'View the OpenClaw course',
|
||||
href: 'https://xiaomo.dev/course/openclaw-ai-assistant/?utm_source=openclaw101&utm_medium=start_page&utm_campaign=first_run_rescue',
|
||||
eventName: 'course_click',
|
||||
},
|
||||
{
|
||||
title: 'Need community help?',
|
||||
body: 'Join the community after you have a screenshot or log from your first-run attempt.',
|
||||
label: 'Open community',
|
||||
href: 'https://discord.com/invite/clawd?utm_source=openclaw101&utm_medium=start_page&utm_campaign=first_run_rescue',
|
||||
eventName: 'community_click',
|
||||
},
|
||||
{
|
||||
title: 'Compare nearby tools',
|
||||
body: 'Browse Skill Hub CN when your next step is prompt packs, agent skills, or workflow templates.',
|
||||
label: 'Browse Skill Hub CN',
|
||||
href: 'https://www.skill-cn.com?utm_source=openclaw101&utm_medium=start_page&utm_campaign=product_referral',
|
||||
eventName: 'product_referral',
|
||||
},
|
||||
],
|
||||
zh: [
|
||||
{
|
||||
title: '想有人带着跑通?',
|
||||
body: '如果不想独自排错,用训练营路径完成第一个 AI 助手闭环。',
|
||||
label: '查看 OpenClaw 实战训练营',
|
||||
href: 'https://xiaomo.dev/course/openclaw-ai-assistant/?utm_source=openclaw101&utm_medium=zh_start_page&utm_campaign=first_run_rescue',
|
||||
eventName: 'course_click',
|
||||
},
|
||||
{
|
||||
title: '需要社区协助?',
|
||||
body: '先准备首次运行截图或终端日志,再到社区提问,排错效率更高。',
|
||||
label: '打开社区',
|
||||
href: 'https://discord.com/invite/clawd?utm_source=openclaw101&utm_medium=zh_start_page&utm_campaign=first_run_rescue',
|
||||
eventName: 'community_click',
|
||||
},
|
||||
{
|
||||
title: '继续找技能/工作流?',
|
||||
body: '去 Skill Hub 中国浏览 Prompt、Agent Skills 和工作流模板。',
|
||||
label: '浏览 Skill Hub 中国',
|
||||
href: 'https://www.skill-cn.com?utm_source=openclaw101&utm_medium=zh_start_page&utm_campaign=product_referral',
|
||||
eventName: 'product_referral',
|
||||
},
|
||||
],
|
||||
} as const;
|
||||
|
||||
export default function StartSetupPage({ locale }: StartSetupPageProps) {
|
||||
const t = copy[locale];
|
||||
const [copied, setCopied] = useState(false);
|
||||
@@ -362,6 +411,46 @@ export default function StartSetupPage({ locale }: StartSetupPageProps) {
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="px-4 pb-24">
|
||||
<div className="mx-auto max-w-5xl rounded-3xl border border-blue-300/20 bg-blue-300/10 p-6 sm:p-8">
|
||||
<div className="max-w-3xl">
|
||||
<div className="text-sm font-bold uppercase tracking-[0.18em] text-blue-200/75">
|
||||
{locale === 'zh' ? '低风险下一步' : 'Low-risk next step'}
|
||||
</div>
|
||||
<h2 className="mt-3 text-2xl font-black">
|
||||
{locale === 'zh' ? '首次回复之后,选择一个可追踪动作' : 'After the first reply, choose one trackable action'}
|
||||
</h2>
|
||||
<p className="mt-3 text-sm leading-6 text-white/62">
|
||||
{locale === 'zh'
|
||||
? '这里不做付款或公开发布,只把课程、社区和产品引用点击记为 lead proxy,方便后续判断 OpenClaw101 的真实承接能力。'
|
||||
: 'No payment or public posting here. These course, community, and product-referral clicks are lead proxies so the next review can judge whether OpenClaw101 has real business handoff.'}
|
||||
</p>
|
||||
</div>
|
||||
<div className="mt-6 grid gap-4 md:grid-cols-3">
|
||||
{leadOptions[locale].map((item) => (
|
||||
<a
|
||||
key={item.href}
|
||||
href={item.href}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
onClick={() => trackEvent(item.eventName, {
|
||||
locale,
|
||||
page: locale === 'zh' ? '/zh/start' : '/start',
|
||||
source: 'start_lead_proxy_card',
|
||||
target: item.href,
|
||||
utm_medium: locale === 'zh' ? 'zh_start_page' : 'start_page',
|
||||
})}
|
||||
className="rounded-2xl border border-white/10 bg-gray-950/55 p-5 transition hover:border-blue-200/35 hover:bg-blue-300/10"
|
||||
>
|
||||
<div className="text-sm font-black text-blue-100">{item.title}</div>
|
||||
<p className="mt-2 text-sm leading-6 text-white/62">{item.body}</p>
|
||||
<div className="mt-4 text-sm font-bold text-blue-200">{item.label} →</div>
|
||||
</a>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,9 @@ export type AnalyticsEventName =
|
||||
| 'first_reply_verified_click'
|
||||
| 'first_run_verified'
|
||||
| 'day2_guide_click'
|
||||
| 'start_setup_completed';
|
||||
| 'start_setup_completed'
|
||||
| 'resource_click'
|
||||
| 'utm_copy_click';
|
||||
|
||||
interface AnalyticsEventProperties {
|
||||
[key: string]: string | number | boolean | undefined;
|
||||
|
||||
Reference in New Issue
Block a user