Skip to content

Commit

Permalink
fix(analytics): change google analytics path
Browse files Browse the repository at this point in the history
  • Loading branch information
arddor committed Sep 12, 2024
1 parent 335a833 commit aec8737
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ enableGitInfo: true
enableEmoji: true
enableInlineShortcodes: true
enableRobotsTXT: true
googleAnalytics: GTM-K6QTH5K

markup:
goldmark:
Expand All @@ -30,6 +29,10 @@ markup:
ordered: false
startLevel: 1

services:
googleAnalytics:
id: GTM-K6QTH5K

imaging:
quality: 75

Expand Down
2 changes: 1 addition & 1 deletion themes/hugo-docs/layouts/partials/html-header.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{{- $worker := resources.Get "search.js" | js.Build }}
<link rel="lunr" href="{{ $worker.RelPermalink }}">

{{- with .Site.GoogleAnalytics }}
{{- with .Site.Config.Services.GoogleAnalytics.ID }}
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
Expand Down

0 comments on commit aec8737

Please sign in to comment.