Disable analytics in dev env, redirect to edit page after event update
- Skip loading /stats/script.js and /assets/perf.js when data-env=dev
- Add data-env="{{ app.environment }}" to body tag
- Redirect to edit event page instead of events list after saving
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,10 @@ function loadAnalytics() {
|
||||
return
|
||||
}
|
||||
|
||||
if (document.body.dataset.env === 'dev') {
|
||||
return
|
||||
}
|
||||
|
||||
const script = document.createElement('script')
|
||||
script.defer = true
|
||||
script.src = '/stats/script.js'
|
||||
|
||||
Reference in New Issue
Block a user