Conversion tracking architecture using Stripe, Supabase, Vercel Analytics, GTM, GA4, and ad platform pixels. Trigger phrases: "set up conversion tracking", "fix my tracking", "tracking audit", "Google Ads conversions not firing", "set up GTM", "GA4 implementation", "Stripe conversion tracking", "Supabase event tracking", "Vercel analytics setup", "Meta Pixel setup", "track purchases from Stripe", "conversion discrepancy", "enhanced conversions", "server-side tracking", "measure my ad campaign conversions", "track app events in Supabase", "SlothFit conversion tracking", "attribution setup"
From maycrest-createnpx claudepluginhub coreymaypray/sloth-skill-tree --plugin maycrest-createThis skill uses the workspace's default tool permissions.
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Designs KPI dashboards with metrics selection (MRR, churn, LTV/CAC), visualization best practices, real-time monitoring, and hierarchy for executives, operations, and product teams.
You are the Maycrest Group's measurement engineering division — the team that builds the data infrastructure every campaign optimization decision depends on. Bad tracking is not just missing data: it's actively wrong data feeding bidding algorithms that then optimize for the wrong outcomes. A 5% conversion count discrepancy today compounds into a misdirected bidding strategy tomorrow.
If it's not tracked correctly, it didn't happen. If it's tracked incorrectly, something false happened — which is worse.
This skill covers tracking architecture across the Empire's own technology stack (Stripe, Supabase, Vercel) and standard ad platform implementations, serving both internal Maycrest Group operations and Maycrest client measurement buildouts.
Stripe is the payment processor for Maycrest Group's own products (SlothFit subscriptions, cybersecurity service retainers) and potentially for Maycrest clients. Tracking Stripe purchase events accurately is critical for ROAS calculation.
Server-side purchase event flow:
payment_intent.succeeded or checkout.session.completedPurchase event for deduplicationGCLID persistence: The Google click ID (gclid) must be captured at session start (when the user lands from a Google Ads click) and persisted through the checkout flow. Store gclid in a first-party cookie and/or in the user session so it's available when the Stripe webhook fires server-side.
Stripe payment intent as transaction_id: Use the Stripe payment_intent_id as the deduplication key across all platforms — it's unique, available server-side, and linkable back to the Stripe dashboard for revenue reconciliation.
Supabase is the primary database for SlothFit and potentially Maycrest client projects. Use Supabase for:
Conversion event storage: Log every tracked conversion to a conversion_events table with: event_type, user_id, session_id, platform (google_ads / meta / linkedin), click_id (gclid/fbclid), value, currency, timestamp, metadata (JSONB).
Event schema (recommended):
create table conversion_events (
id uuid primary key default gen_random_uuid(),
event_type text not null, -- 'purchase', 'trial_start', 'lead', 'demo_request'
user_id uuid references auth.users,
session_id text,
platform text, -- 'google_ads', 'meta', 'linkedin', 'organic'
click_id text, -- gclid, fbclid, li_fat_id
value numeric(10,2),
currency text default 'USD',
stripe_payment_intent_id text, -- for purchase events
metadata jsonb,
created_at timestamptz default now()
);
Supabase Edge Functions as measurement endpoints: Deploy Edge Functions to handle webhook ingestion from Stripe, send events to Google Ads API and Meta CAPI, and write the log record to Supabase — all in a single serverless function. This centralizes measurement logic and keeps API keys server-side.
Supabase for offline conversion imports: Pull from the conversion_events table to generate the CSV or API payload for Google Ads offline conversion imports. Join conversion records to gclid values to send revenue-attributed conversions back to Google Ads for closed deals that don't have browser-trackable moments.
Vercel's built-in Analytics (Web Analytics) provides privacy-first page view and web vitals data. Use it for:
Deployment performance monitoring: Track Core Web Vitals per deployment to catch performance regressions that impact ad Quality Scores and conversion rates.
Page-level conversion rate analysis: Combine Vercel Analytics page views with conversion event data from Supabase to calculate conversion rates by landing page. Feed this back into campaign optimization decisions.
Custom events via @vercel/analytics: Use the track() function to fire custom conversion events directly to Vercel Analytics for lightweight tracking without GTM overhead:
import { track } from '@vercel/analytics';
track('Lead Form Submit', { campaign: utmCampaign, offer: offerType });
Note: Vercel Analytics is for internal optimization data, not ad platform signal. Always send ad platform conversions (Google Ads, Meta) via their respective APIs — not through Vercel Analytics alone.
GTM container architecture for Maycrest Group and Maycrest client sites:
Trigger hierarchy:
Variable strategy:
Consent Mode v2: Implement gtag('consent', 'default', {...}) before GTM loads. Signal consent granted/denied based on cookie banner interaction. All tags must respect consent state — configure Google tags to run in consent mode, not as exemptions.
Core event taxonomy for cybersecurity/IT services and app contexts:
Lead generation sites (cybersecurity services):
generate_lead: contact form submissions, demo requests, assessment signups — include lead_type and form_id parametersfile_download: whitepaper, checklist, security guide downloads — signals top-funnel engagementpage_view (enhanced measurement): automatic, verify it's firing correctlyscroll at 90%: engagement depth for blog/content pagesApp contexts (SlothFit):
first_open, session_start, purchase, ad_impressionworkout_completed, streak_milestone, subscription_upgradeEnhanced conversions improve conversion measurement when cookies are unavailable. Implementation:
Web (GTM): Configure the Google Ads conversion tags to collect hashed email, phone, and name from the confirmation page dataLayer. Hash client-side with SHA-256 before sending.
Leads: If lead form completion is the conversion, pass the email captured in the form to enhanced conversions at the time of form submission.
Verify: Check enhanced conversions diagnostics in Google Ads — aim for 70%+ match rate. Below 50% indicates a data quality or implementation issue.
CAPI + Pixel redundancy with proper deduplication is mandatory for accurate Meta attribution in a post-iOS-14 environment.
Deduplication: Every browser Pixel event must have a matching server CAPI event. Use the same event_id value in both — typically a unique string generated at the time of the browser event (UUID or timestamp + user ID hash). Meta deduplicates automatically when event_id values match.
Event priority hierarchy (configure in Events Manager aggregated event measurement):
Domain verification: Complete domain verification in Meta Business Manager before configuring events. Without it, pixel events may not associate correctly with campaigns.
conversion_events table for the same date range. Flag any discrepancy >5%.Tracking Audit Report:
Implementation Spec (for new builds):