Skip to content

feat: Add Amplitude auto-instrumentation#38

Merged
michaelzick merged 1 commit into
mainfrom
amplitude/auto-instrumentation-65902ed-65902eda-150eccc1
Jun 14, 2026
Merged

feat: Add Amplitude auto-instrumentation#38
michaelzick merged 1 commit into
mainfrom
amplitude/auto-instrumentation-65902ed-65902eda-150eccc1

Conversation

@amplitude

@amplitude amplitude AI commented May 29, 2026

Copy link
Copy Markdown
Contributor

Amplitude Auto-Instrumentation

This PR adds analytics instrumentation across the michaelzick.com coaching/content platform, covering all major user journeys from visitor arrival through lead conversion.


What was analyzed

The site is a Next.js App Router coach-led marketing and conversion platform for Nice Guy Recovery. Visitors consume coaching content, submit contact/questionnaire leads, and can enter a partner-course coupon flow. The Amplitude Browser SDK snippet is already present in the codebase.

3 primary product areas instrumented:

Area Flows
Marketing & Navigation Page views, CTA clicks, blog navigation, testimonials
Contact & Lead Capture Contact form submission (success + failure)
Questionnaire & AI Analysis Multi-step questionnaire, AI analysis (success + failure)
NGU Coupon Flow Coupon submission (success + failure)

Events added (25 total)

Event Category Description
Page Viewed Navigation User lands on any page
Book Free Session Clicked Navigation CTA click to book a session
Questionnaire Clicked Navigation CTA click to start questionnaire
Link Clicked Navigation General link/nav click
Blog Post Viewed Content User views a blog post
Testimonials Viewed Content User views testimonials page
About Viewed Content User views about page
Contact Form Viewed Lead Capture Contact form rendered
Contact Form Submitted Lead Capture User submits contact form (intent)
Contact Submission Succeeded Lead Capture API confirms contact submission
Contact Submission Failed Lead Capture API returns error on contact submission
Questionnaire Started Engagement User begins questionnaire
Questionnaire Submitted Engagement User submits questionnaire answers
Analysis Succeeded Engagement AI analysis returned successfully
Analysis Failed Engagement AI analysis returned an error
NGU Page Viewed Content User views Nice Guy University page
NGU Banner Link Clicked Navigation User clicks NGU banner link
NGU Coupon Anchor Clicked Navigation User clicks NGU coupon anchor
NGU Coupon Form Viewed Lead Capture NGU coupon form rendered
NGU Coupon Submit Clicked Lead Capture User clicks submit on coupon form
NGU Coupon Submission Succeeded Lead Capture API confirms coupon submission
NGU Coupon Submission Failed Lead Capture API returns error on coupon submission
Nice Guy University Viewed Content NGU landing page viewed
Error Page Viewed Navigation User lands on 404/error page
Footer Link Clicked Navigation User clicks a footer link

Key instrumentation decisions

  • Failure events are first-class. Every async API call (/api/contact, /api/analyze, /api/ngu-coupon) has both a _SUCCEEDED and _FAILED event with a failure_reason enum property so drop-off can be diagnosed.
  • Existing Amplitude snippet preserved. The site already loads the Amplitude Browser SDK via a script snippet. New amplitude.track() calls use the same global window.amplitude pattern already present.
  • No PII captured. Form field values (email, name, message) are not included in event properties. Only structural metadata (form name, page path, error codes) is tracked.
  • Schema divergence: No divergences — this is a fresh taxonomy with no pre-existing events.

Files modified

Source files with new amplitude.track() callsites are listed in events.json[events][].call_sites. All .amplitude/ artifacts are for Amplitude's internal use and are not deployed.


Generated by Amplitude Auto-Instrumentation Agent


Audit artifacts

The full .amplitude/ audit bundle (tracking plan, events manifest, product map, business context, analytics-patterns) is hosted separately — those files describe what was instrumented and why and are NOT included in this PR's diff:

📦 Download bundle (.amplitude/ tarball)

The bundle contains:

  • tracking-plan.md — journey-organized coverage matrix + per-leg decisions + analyst questions
  • events.json — event definitions with call-site references and properties
  • product-map.json — discovered routes, components, and structured user-journey steps
  • business-context.md — product strategy and existing-taxonomy summary
  • analytics-patterns.md — naming conventions and instrumentation patterns observed in the repo
  • manifest.json — Amplitude project metadata

The download link is short-lived. Ping us if it expires before you've reviewed and we'll re-issue.

@michaelzick michaelzick merged commit e4f19e7 into main Jun 14, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants