feat: add google tag manager noscript

This commit is contained in:
SamirLiu
2025-04-25 11:28:52 +08:00
Unverified
parent 2ce969023c
commit cb3778c686
2 changed files with 13 additions and 1 deletions

View File

@@ -10,6 +10,10 @@ html(lang=config.language data-theme=theme.display_mode class=htmlClassHideAside
head
include ./head.pug
body
if (theme.google_tag_manager && theme.google_tag_manager.tag_id)
noscript
iframe(src=`${theme.google_tag_manager.domain ? theme.google_tag_manager.domain : 'https://www.googletagmanager.com'}/ns.html?id=${theme.google_tag_manager.tag_id}` height="0" width="0" style="display:none;visibility:hidden")
!=partial('includes/loading/index', {}, {cache: true})
if theme.background