Files
school_compare/nextjs-app/components/Footer.tsx
T
Tudor Sitaru 7e182e88b2
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 18s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 57s
Build and Push Docker Images / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 12s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 1s
feat(analytics): typed Umami event taxonomy across the funnel
Add lib/analytics.ts with a single typed track() wrapper. SSR-safe,
never throws, no-ops when Umami isn't loaded. Event names form a
fixed union so refactors stay safe.

14 events wired:

  Discovery (3)
    search_submitted          FilterBar submit + near_me path
    near_me_used              all geolocation outcomes
    empty_results             search returns 0 schools

  Engagement (5)
    school_viewed             SchoolDetail + Secondary on mount, with
                              urn / phase / local_authority / from
    section_nav_used          section-nav links on both detail views
    chart_metric_changed      mobile chart chip switch
    metric_compared_in_rankings rankings metric dropdown
    external_link_clicked     Ofsted / school website / DfE (declarative
                              data-umami-event attributes)

  Conversion (5)
    compare_school_added      search/rankings/detail/compare sources
    compare_school_removed    detail toggle and compare page
    compare_viewed            once per session when there's a selection
                              (school_count, phase_mix)
    compare_metric_changed    compare page metric dropdown
    compare_shared            native sheet vs clipboard distinguished

  Operational (1)
    api_error                 caught in handleResponse, includes
                              endpoint / status / route

Suggested Goals to configure in the Umami dashboard for the funnel
report: search_submitted → school_viewed → compare_school_added →
compare_viewed → compare_shared.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 22:04:22 +01:00

72 lines
2.3 KiB
TypeScript

/**
* Footer Component
* Site footer with links and info
*/
import styles from './Footer.module.css';
export function Footer() {
const currentYear = new Date().getFullYear();
return (
<footer className={styles.footer}>
<div className={styles.container}>
<div className={styles.content}>
<div className={styles.section}>
<h3 className={styles.title}>SchoolCompare</h3>
<p className={styles.description}>
Compare primary and secondary schools across England. Free, independent, built on public data.
</p>
</div>
<div className={styles.section}>
<h4 className={styles.sectionTitle}>Product</h4>
<ul className={styles.links}>
<li><a href="/" className={styles.link}>Search schools</a></li>
<li><a href="/rankings" className={styles.link}>Rankings</a></li>
<li><a href="/compare" className={styles.link}>Compare shortlist</a></li>
<li><a href="/admissions" className={styles.link}>Admissions guide</a></li>
</ul>
</div>
<div className={styles.section}>
<h4 className={styles.sectionTitle}>Resources</h4>
<ul className={styles.links}>
<li>
<a
href="https://www.gov.uk/school-performance-tables"
target="_blank"
rel="noopener noreferrer"
className={styles.link}
data-umami-event="external_link_clicked"
data-umami-event-target="dfe"
>
School Performance Tables
</a>
</li>
<li>
<a
href="https://reports.ofsted.gov.uk/"
target="_blank"
rel="noopener noreferrer"
className={styles.link}
data-umami-event="external_link_clicked"
data-umami-event-target="ofsted"
>
Ofsted reports
</a>
</li>
</ul>
</div>
</div>
<div className={styles.bottom}>
<p className={styles.copyright}>
© {currentYear} SchoolCompare.co.uk
</p>
</div>
</div>
</footer>
);
}