What's New
Google Tag Manager Integration
- Add
gtm_container_idfield to SEOSettings with validation (GTM-XXXXXX format) - GTM script automatically included in
{% seo_head %}output - GTM noscript fallback in new
{% seo_body %}template tag
robots.txt Management
- Add
robots_txtfield to SEOSettings for custom content - New
robots_txtview with sensible defaults (allow all, include sitemap) - Easy integration via
include('wagtail_herald.urls')
Custom Code Injection
- Add
custom_body_end_htmlfield for HTML before</body> - Use cases: chat widgets (Intercom, Zendesk), deferred scripts, third-party integrations
New Template Tag
{% seo_body %}- Outputs GTM noscript fallback and custom body end HTML
Breaking Changes
Removed Fields
google_site_verification- Use GTM, DNS verification, orcustom_head_htmlbing_site_verification- Use GTM, DNS verification, orcustom_head_html
Migration Guide
-
Run migrations:
python manage.py migrate
-
Add
{% seo_body %}to your base template:<body> {% seo_body %} <!-- your content --> </body>
-
For robots.txt, add to urls.py:
path('', include('wagtail_herald.urls')),