Analytics
Add an analytics script to every page without touching the layouts.
Emberstack doesn't pick an analytics provider for you. You can add one in two ways.
Custom scripts
Middleware injects HTML from customscripts in src/data/settings.json into every HTML response, except the CMS admin:
"customscripts": {
"header": "<script defer src=\"https://analytics.example.com/script.js\" data-site=\"YOUR_ID\"></script>",
"footer": ""
}header goes at the end of <head> and footer at the end of <body>. This is the quickest way to add Plausible, Umami, Fathom, Google Analytics or similar.
In the layouts
For more control, add the snippet to the layouts directly: src/layouts/Base.astro for the public site and src/layouts/HeadLayout.astro for the app and sign-in pages.
Cloudflare Web Analytics
If your domain is on Cloudflare you can turn on Web Analytics in the dashboard without adding any code. It's cookie-free and covers page views and Core Web Vitals.