This guide will get your SEO and analytics up and running in 10 minutes.
- Access to GitHub repository settings
- Access to your deployment platform (Vercel/Netlify/Railway)
- Go to posthog.com and create a free account
- Create a new project (or use existing)
- Navigate to: Project Settings → Project Variables
- Copy your Project API Key (starts with
phc_)
Choose your platform:
Vercel
- Go to: https://vercel.com/[your-account]/sbdk-dev/settings/environment-variables
- Click "Add New"
- Add these two variables:
Key: NEXT_PUBLIC_POSTHOG_KEY Value: phc_your_key_here Key: NEXT_PUBLIC_POSTHOG_HOST Value: https://us.i.posthog.com - Click "Save"
- Redeploy: Go to Deployments → Click "..." → "Redeploy"
Netlify
- Go to: Site settings → Environment variables
- Add these variables:
NEXT_PUBLIC_POSTHOG_KEY = phc_your_key_here NEXT_PUBLIC_POSTHOG_HOST = https://us.i.posthog.com - Trigger deploy: Deploys → Trigger deploy
Railway
- Go to your service → Variables tab
- Click "New Variable"
- Add:
NEXT_PUBLIC_POSTHOG_KEY = phc_your_key_here NEXT_PUBLIC_POSTHOG_HOST = https://us.i.posthog.com - Railway auto-redeploys
- Visit your deployed site
- Open Posthog dashboard → Activity
- You should see pageview events appearing in real-time!
- Go to Google Search Console
- Click "Add Property"
- Choose URL prefix
- Enter:
https://sbdk.dev - Click "Continue"
- Select HTML tag method
- Copy the code from:
<meta name="google-site-verification" content="THIS_PART" />- Example: Copy
abc123XYZfromcontent="abc123XYZ"
- Example: Copy
- Open:
app/layout.tsx(line 75) - Replace:
With:
<meta name="google-site-verification" content="YOUR_VERIFICATION_CODE" />
<meta name="google-site-verification" content="abc123XYZ" />
- Commit and push:
git add app/layout.tsx git commit -m "feat: add Google Search Console verification" git push
- Wait for deployment (~2 minutes)
- Go back to Google Search Console
- Click "Verify"
- You should see: ✅ "Ownership verified"
- In Google Search Console, click "Sitemaps" (left menu)
- Enter:
sitemap.xml - Click "Submit"
Done! Google will start indexing your site.
- ✅ Visit: https://sbdk.dev/sitemap.xml (should show sitemap)
- ✅ Visit: https://sbdk.dev/robots.txt (should show robots file)
- ✅ Test structured data: https://search.google.com/test/rich-results
- Enter your URL
- Should show: SoftwareApplication, Organization, FAQPage
- ✅ Visit your site
- ✅ Click around (buttons, links)
- ✅ Check Posthog dashboard
- ✅ Should see: pageviews, clicks, autocapture events
- Pageviews - Every page navigation
- Clicks - All button and link clicks
- Forms - Form interactions
- Sessions - User session duration
You can add custom tracking to any component:
import { analytics } from '@/lib/analytics'
// Track CTA clicks
analytics.trackCTA('hero', 'Get Started', '/github')
// Track demo interactions
analytics.trackDemoInteraction('pipeline_started')
// Track GitHub clicks
analytics.trackGitHubClick('header')See lib/analytics.ts for all available tracking methods.
- Check Posthog for traffic and engagement
- Review conversion metrics (CTA clicks → GitHub stars)
- Check demo engagement rates
- Review Google Search Console for:
- Crawl errors
- Search performance
- Index coverage
- Update FAQ schema if questions change
Issue: No events in Posthog dashboard
Solutions:
- Check environment variables are set correctly
- Look for errors in browser console (F12)
- Disable ad blockers temporarily
- Verify API key is correct (starts with
phc_)
Issue: "Verification failed" message
Solutions:
- Check the verification code is correct in
app/layout.tsx:75 - Ensure site is deployed and accessible
- Wait 1-2 minutes and try again
- Clear cache: Ctrl+Shift+R on your site
Issue: Rich results test shows errors
Solutions:
- Wait 24-48 hours for Google to crawl
- Check JSON-LD syntax in browser DevTools
- Submit sitemap to Search Console
- Verify no JavaScript errors on page
- Full documentation: See
ANALYTICS_SETUP.md - Posthog docs: https://posthog.com/docs
- Google Search Console: https://support.google.com/webmasters
Before going live:
- Posthog API key added to deployment platform
- Google Search Console verification code added
- Site deployed and accessible
- Verified in Google Search Console
- Sitemap submitted to Google
- Posthog events appearing
- Structured data validated
- No console errors on site
Total setup time: ~10 minutes Result: Full SEO + Analytics tracking ready!