feat: Add Amplitude auto-instrumentation#38
Merged
michaelzick merged 1 commit intoJun 14, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Amplitude Auto-Instrumentation
This PR adds analytics instrumentation across the
michaelzick.comcoaching/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:
Events added (25 total)
Page ViewedBook Free Session ClickedQuestionnaire ClickedLink ClickedBlog Post ViewedTestimonials ViewedAbout ViewedContact Form ViewedContact Form SubmittedContact Submission SucceededContact Submission FailedQuestionnaire StartedQuestionnaire SubmittedAnalysis SucceededAnalysis FailedNGU Page ViewedNGU Banner Link ClickedNGU Coupon Anchor ClickedNGU Coupon Form ViewedNGU Coupon Submit ClickedNGU Coupon Submission SucceededNGU Coupon Submission FailedNice Guy University ViewedError Page ViewedFooter Link ClickedKey instrumentation decisions
/api/contact,/api/analyze,/api/ngu-coupon) has both a_SUCCEEDEDand_FAILEDevent with afailure_reasonenum property so drop-off can be diagnosed.amplitude.track()calls use the same globalwindow.amplitudepattern already present.Files modified
Source files with new
amplitude.track()callsites are listed inevents.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 questionsevents.json— event definitions with call-site references and propertiesproduct-map.json— discovered routes, components, and structured user-journey stepsbusiness-context.md— product strategy and existing-taxonomy summaryanalytics-patterns.md— naming conventions and instrumentation patterns observed in the repomanifest.json— Amplitude project metadata