Release 0.72.3#3553
Merged
Merged
Conversation
* Add GTM tracking for course enroll/unenroll Add a small GTM helper (frontends/main/src/common/analytics/gtm.ts) that pushes events to window.dataLayer and export trackCourseEnrolled/trackCourseUnenrolled. Instrument enrollment and unenrollment success flows to send these events with the course/program title across dashboard, module, product, and enrollment dialog components (DashboardCard, ModuleCard, DashboardDialogs, CourseEnrollmentButton, ProgramEnrollmentButton, CourseEnrollmentDialog, ProgramEnrollmentDialog). * Redirect to dashboard; update analytics & PostHog Add a site root page that redirects to /dashboard. Update GTM event payload for unenrollment to send "course-unenrolled-name" while keeping the old "course-enrolled-name" for backward compatibility. Enhance ConfiguredPostHogProvider with FeatureFlags import and LOCAL_FLAG_OVERRIDES so feature flags can be forced for local dev; merge overrides into bootstrap flags, provide a local POSTHOG_API_KEY fallback when overrides exist, and only initialize PostHog/provider when an API key or local overrides are present to enable local testing without a PostHog account. * fmt * revert * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * updates * add try catch * Add GTM analytics utilities and instrumentation Introduce GTM/UTM analytics utilities and tests, and instrument UI to emit tracking events. Adds new analytics modules (common/analytics/gtm.ts, common/analytics/utm.ts) with helper functions (landing/ad arrival, course/program view, start enrollment, video start/50%, addToCart, site search, catalog filter, download asset, etc.) and corresponding unit tests. Wire tracking calls into multiple components: Certificate download, AboutSection expand, Course/Program pages view, enrollment flows (start, begin checkout, addToCart), StayUpdated modal sign-ups, video player play/50% hooks and VideoResourcePlayer, search field/site search, and catalog filter. Add AnalyticsTracker in SiteProviders to record first-session landing/ad/organic social/return-visit events. Exports types for analytics params. These changes enable richer marketing attribution and GTM data-layer events across the app. * Remove trackDownloadAsset GTM helper Delete the trackDownloadAsset helper and its DownloadAssetParams type from common/analytics/gtm.ts, remove associated unit tests in gtm.test.ts, and remove the import/call from CertificatePage.tsx. Updates exports accordingly and cleans up unused analytics code and tests. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * format * format * lint * format * typecheck * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * update add to cart event name * fix test --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
OpenAPI ChangesNo changes detected Unexpected changes? Ensure your branch is up-to-date with |
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.
Danielle Frappier
Matt Bertrand
cp-at-mit